{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.0.0-alpha","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package primitives\n\n## Constants\n\n```go\nconst (\n\t// NonceSize is the default NonceSize\n\tNonceSize = 24\n)\n```\n\n## Functions\n\n```go\nfunc GetDefaultCurve() elliptic.Curve\n```\nGetDefaultCurve returns the default elliptic curve used by the crypto layer\n\n```go\nfunc GetDefaultHash() func() hash.Hash\n```\nGetDefaultHash returns the default hash function used by the crypto layer\n\n```go\nfunc GetHashAlgorithm() string\n```\nGetHashAlgorithm return the default hash algorithm\n\n```go\nfunc GetRandomBytes(len int) ([]byte, error)\n```\nGetRandomBytes returns len random looking bytes\n\n```go\nfunc GetRandomNonce() ([]byte, error)\n```\nGetRandomNonce returns a random byte array of length NonceSize\n\n```go\nfunc HMACTruncated(key, x []byte, truncation int) []byte\n```\nHMACTruncated hmacs x using key key and truncate to truncation\n\n```go\nfunc Hash(msg []byte) []byte\n```\nHash hashes the msh using the predefined hash function\n\n```go\nfunc InitSecurityLevel(algorithm string, level int) (err error)\n```\nInitSecurityLevel initialize the crypto layer at the given security level\n\n```go\nfunc NewHash() hash.Hash\n```\nNewHash returns a new hash function\n\n```go\nfunc SetSecurityLevel(algorithm string, level int) (err error)\n```\nSetSecurityLevel sets the security configuration with the hash length and the algorithm\n\n","path":"github.com/eric-erki/https-hyperledger.org/core/crypto/primitives","name":"primitives","synopsis":"","isRedistributable":true}
