encryption

package
v0.0.0-...-75d2a66 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AESKeyMap = aesCipher{synx.NewRWMutexMap()}

Functions

func AESDecrypt

func AESDecrypt(key string, ciphertext []byte) (string, error)

func AESEncrypt

func AESEncrypt(key string, plaintext []byte) (string, error)

func Decode

func Decode(value []byte) ([]byte, error)

func Decrypt

func Decrypt(block cipher.Block, value []byte) ([]byte, error)

func Encode

func Encode(value []byte) []byte

func EncodePwd

func EncodePwd(password []byte) (pwd, salt []byte)

func EncodePwdStr

func EncodePwdStr(password string) (pwd, salt string)

func Encrypt

func Encrypt(block cipher.Block, value []byte) ([]byte, error)

func EqualPwd

func EqualPwd(password []byte, dbPassword, dbSalt []byte) bool

func EqualPwdStr

func EqualPwdStr(password string, dbPassword, dbSalt string) bool

func GenerateRandomKey

func GenerateRandomKey(length int) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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