signature

package
v0.0.0-...-b7aefed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2014 License: Apache-2.0, Apache-2.0, BSD-2-Clause-Views, + 2 more Imports: 5 Imported by: 0

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

func SignMessage(message, secret []byte) []byte

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL