Documentation ¶
Index ¶
Constants ¶
View Source
const ImplicitMessageIntegrityKey = "IMPLICIT_MESSAGE_INTEGRITY_KEY"
View Source
const SignatureFieldName = "signature"
Variables ¶
This section is empty.
Functions ¶
func SignProto ¶
func SignProto(message VerifiableMessage, key []byte) error
SignProto signs a proto that has a proto field Signature.
func ValidateHMAC ¶
func ValidateHMAC(message VerifiableMessage, key []byte) (bool, error)
Check the signature embedded in the protobuf message is correct for the message by recalculating it using the secret key.
Types ¶
type VerifiableMessage ¶
VerifiableMessage a proto message that has a Signature field. Using the extension interface pattern so that I can read the Signature.
Click to show internal directories.
Click to hide internal directories.