Documentation ¶
Overview ¶
Messages are prepended with a HMAC SHA256 signature (the signature makes up the first 32 bytes of a signed message; the remainder is the original message in cleartext).
Index ¶
Constants ¶
View Source
const SIGNATURE_LENGTH = 32
Variables ¶
This section is empty.
Functions ¶
func SignMessage ¶
SignMessage returns a message signed with the provided secret, with the signature prepended to the original message.
Types ¶
type SignatureVerifier ¶
type SignatureVerifier interface { instrumentation.Instrumentable Run(inputChan <-chan []byte, outputChan chan<- []byte) }
A SignatureVerifier is a self-instrumenting pipeline object that validates and removes signatures.
func NewSignatureVerifier ¶
func NewSignatureVerifier(logger *gosteno.Logger, sharedSecret string) SignatureVerifier
NewSignatureVerifier returns a SignatureVerifier with the provided logger and shared signing secret.
Click to show internal directories.
Click to hide internal directories.