Documentation ¶
Index ¶
- func CreateClientProof(clientSignature []byte, serverSignature []byte) string
- func GenerateRandomBytes(n int) ([]byte, error)
- func GetHMACSHA256(secret []byte, valueToEncrypt string) []byte
- func GetPBKDF2Hash(password string, salt string, rounds int) []byte
- func GetSHA256Hash(valueToHash []byte) []byte
- func RandSeq(n int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClientProof ¶
CreateClientProof returns the client proof computed by client and server signature as base64 encoded string
func GenerateRandomBytes ¶
GenerateRandomBytes returns random []byte with length n
func GetHMACSHA256 ¶
GetHMACSHA256 returns a HMAC hash using the SHA256 algorithm as []byte Credits to https://golangcode.com/generate-sha256-hmac/
func GetPBKDF2Hash ¶
GetPBKDF2Hash returns a key from the password, salt and iteration count, returning a []byte of length 32
func GetSHA256Hash ¶
GetSHA256Hash returns a SHA256 checksum of the data as []byte
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.