encryption

package module
v0.0.0-...-6ad9874 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2015 License: MIT Imports: 6 Imported by: 0

README

Node Go AES encryption example

This is an example of how to encrypt a string using AES which is then passed between node.js and Go.

Overview

I banged my head for quite a while in order to get AES encryption to work when sending a string between node.js and Go. Hopefully sharing this will stop others from having the same headaches.

Obviously, these would be used in seperate solutions.

Disclaimer

Although this code does work it isn't meant to be a fully functioning app but more an example of how it can be done. Please take the code "as is". You might need to tweak some of the flow to get it to work for you.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key, text string) []byte

----- Decrypts aa encrypted AES string and is compatible with node crypto AES encryption

func Encrypt

func Encrypt(key, text string) string

----- Encrypts a string for usage with node using AES encryption

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL