serializer

package module
v0.0.0-...-8a9ceae Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: MIT Imports: 9 Imported by: 0

README

Serializer

This module provides function to go from string to [opaque] string or vice & versa

Installation

$ go get github.com/GerardSoleCa/go-serializer

Usage

  • serializer.SecureStringify(str, encryptKey, validationKey string): Returns a string representing the given original string. It is signed and encrypted using the given keys.
  • serializer.SecureParse(str, encryptKey, validationKey string): Returns the original string decrypting and validating the secure one

The cypher used is aes256, the crypted data is in hex. The signing process uses HMAC with SHA1.

Test

$ go test

Credits

Extracted from node-serializer.

Original author: Pierre Ruyssen

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SecureParse

func SecureParse(str string, encryptKey string, validateKey string) (string, error)

func SecureStringify

func SecureStringify(str, encryptKey, validateKey string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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