Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrCipherFailure common.ErrMsg = "Unable to initialize AES cipher" ErrMacFailure common.ErrMsg = "Unable to initialize Mac" )
View Source
const ( ErrInvalidNonceSize common.ErrMsg = "Invalid nonce size" ErrUnableToGenerateNonce common.ErrMsg = "Unable to generate nonce" )
Variables ¶
This section is empty.
Functions ¶
func EncodePEMSymmetricKey ¶ added in v0.7.0
EncodePEMSymmetricKey encodes the raw key in a PEM block with the SYMMETRIC KEY type.
func ParsePEMSymmetricKey ¶ added in v0.7.0
ParsePEMSymmetricKey parses the first PEM block in b and returns the data within.
This provides a more idiomatic way of accessing errors (when compared with the pem.Decode function), and allows us to add more validation in the future (e.g., if we want to make use of PEM headers).
func RandInt64 ¶
func RandInt64() int64
RandInt64 returns a random int64 value. The returned value can be negative.
func RandUint64 ¶
func RandUint64() uint64
Types ¶
type Version ¶ added in v0.4.0
type Version uint64
Version identifies the version of a trust file. It cannot be marshalled/unmarshalled to/from LatestVer.
const LatestVer Version = 0
LatestVer is the wildcard version indicating the highest available version when requesting certificate chains and TRCs.
Click to show internal directories.
Click to hide internal directories.