gotools

package module
v0.0.0-...-cbafe43 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2017 License: MIT Imports: 8 Imported by: 0

README

gotools

The collection features GoLang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeHmac

func EncodeHmac(secret, value string, params ...func() hash.Hash) string

func EncodeMd5

func EncodeMd5(str string) string

Encode string to md5 hex value

func EncodePassword

func EncodePassword(rawPwd string, salt string) string

use pbkdf2 encode password

func GetRandomNumString

func GetRandomNumString(n int) string

GetRandomNumString Random generate string only Number

func GetRandomString

func GetRandomString(n int) string

GetRandomString - Random generate string

func PBKDF2

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

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

func PasswordBcrypt

func PasswordBcrypt(password string) string

Hashing the password with the default cost of 10 Return bcrypt password

func VerifyPassword

func VerifyPassword(hashedPassword string, password string) error

VerifyPassword compare raw password and encoded password Comparing the password with the hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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