Documentation ¶
Index ¶
- Constants
- func Base64Decode(input string) ([]byte, error)
- func Base64Encode(input []byte) string
- func GetHMAC(hashType int, input, key []byte) []byte
- func GetMD5(input []byte) []byte
- func GetRandomSalt(input []byte, saltLen int) ([]byte, error)
- func GetSHA256(input []byte) []byte
- func GetSHA512(input []byte) []byte
- func HexEncodeToString(input []byte) string
- func Sha1ToHex(data string) string
Constants ¶
View Source
const ( HashSHA1 = iota HashSHA256 HashSHA512 HashSHA512_384 HashMD5 )
Const declarations for common.go operations
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
Base64Decode takes in a Base64 string and returns a byte array and an error
func Base64Encode ¶
Base64Encode takes in a byte array then returns an encoded base64 string
func GetRandomSalt ¶
GetRandomSalt returns a random salt
func HexEncodeToString ¶
HexEncodeToString takes in a hexadecimal byte array and returns a string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.