Documentation ¶
Index ¶
- Constants
- func GetDefaultCurve() elliptic.Curve
- func GetDefaultHash() func() hash.Hash
- func GetHashAlgorithm() string
- func GetRandomBytes(len int) ([]byte, error)
- func GetRandomNonce() ([]byte, error)
- func HMACTruncated(key, x []byte, truncation int) []byte
- func Hash(msg []byte) []byte
- func InitSecurityLevel(algorithm string, level int) (err error)
- func NewHash() hash.Hash
- func SetSecurityLevel(algorithm string, level int) (err error)
Constants ¶
View Source
const (
// NonceSize is the default NonceSize
NonceSize = 24
)
Variables ¶
This section is empty.
Functions ¶
func GetDefaultCurve ¶
GetDefaultCurve returns the default elliptic curve used by the crypto layer
func GetDefaultHash ¶
GetDefaultHash returns the default hash function used by the crypto layer
func GetHashAlgorithm ¶
func GetHashAlgorithm() string
GetHashAlgorithm return the default hash algorithm
func GetRandomBytes ¶
GetRandomBytes returns len random looking bytes
func GetRandomNonce ¶
GetRandomNonce returns a random byte array of length NonceSize
func HMACTruncated ¶
HMACTruncated hmacs x using key key and truncate to truncation
func InitSecurityLevel ¶
InitSecurityLevel initialize the crypto layer at the given security level
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.