Documentation ¶
Index ¶
- Constants
- func Base64Decode(input string) ([]byte, error)
- func Base64Encode(input []byte) string
- func CheckCerts(certDir string) error
- func GetHMAC(hashType int, input, key []byte) ([]byte, error)
- func GetMD5(input []byte) ([]byte, error)
- func GetRandomSalt(input []byte, saltLen int) ([]byte, error)
- func GetSHA256(input []byte) ([]byte, error)
- func GetSHA512(input []byte) ([]byte, error)
- func GetTLSDir(dir string) string
- func HexEncodeToString(input []byte) string
- func Sha1ToHex(data string) (string, error)
Constants ¶
View Source
const ( HashSHA1 = iota HashSHA256 HashSHA512 HashSHA512_384 HashMD5 )
const declarations for common crypto 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 CheckCerts ¶
CheckCerts will check to see if certificates exist in the supplied directory, and then verify that the certificate is not expired. If no certificates exist, or they are expired, it will create new self-signed certificates.
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.