encryptionUtils

package
v0.0.0-...-e2c1db5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePassword

func EncodePassword(rawPwd string, salt string) string

use pbkdf2 encode password

func EncryptPasswordForDB

func EncryptPasswordForDB(password string, passwordSaltLength int) string

func GetRandomQrCodeSecurityToken

func GetRandomQrCodeSecurityToken(n int) string

Random generate string

func GetRandomString

func GetRandomString(n int) string

func GetUserPasswordSalt

func GetUserPasswordSalt(passwordSaltLength int) string

return a user salt token

func PBKDF2

func PBKDF2(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte

This code was copied from: http://code.google.com/p/go/source/browse/pbkdf2/pbkdf2.go?repo=crypto

func VerifyPassword

func VerifyPassword(rawPwd, encodedPwd string, passwordSaltLength int) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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