Documentation ¶
Overview ¶
Package hmacsigner provides signed blobs.
It:
1) Includes a version.
2) Includes 8 byte nanosecond unix timestamp.
3) Includes 8 byte salt.
4) Requires a Secret of at least 32 bytes.
5) Does not encrypt the payload.
6) Enforces HMAC-SHA256 signatures.
7) Outputs URL safe Base64 encoding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTooShort indicates the data to parse is too short to be valid. ErrTooShort = errors.New("hmacsigner: too short") // ErrInvalidVersion indicates the version was invalid. ErrInvalidVersion = errors.New("hmacsigner: invalid version") // ErrInvalidEncoding indicates the encoding is invalid. ErrInvalidEncoding = errors.New("hmacsigner: invalid encoding") // ErrTimestampExpired indicates the timestamp has expired. ErrTimestampExpired = errors.New("hmacsigner: timestamp expired") // ErrSignatureMismatch indicates the signature is not as expected. ErrSignatureMismatch = errors.New("hmacsigner: signature mismatch") )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.