Documentation ¶
Index ¶
Constants ¶
View Source
const ( EpochSize = 4 MessageOffset = EpochSize + 4 )
Variables ¶
This section is empty.
Functions ¶
func SignatureToUint32 ¶
Types ¶
type MAC ¶
type MAC struct {
// contains filtered or unexported fields
}
MAC has the ability to encrypt and decrypt (short) messages as long as they share the same key and the same epoch.
func New ¶
New builds a new MAC using a 256-bit/32 byte encryption key, a numeric epoch and numeric pseudo-random salt
func (*MAC) Decrypt ¶
Decrypt decrypts src and appends to dst, returning the resulting byte slice or an error if the input cannot be authenticated.
Click to show internal directories.
Click to hide internal directories.