Versions in this module Expand all Collapse all v1 v1.0.0 Aug 25, 2022 Changes in this version + const RequestTarget + type DataError struct + func NewDataError(message string, err error) *DataError + func (de *DataError) Error() string + func (de *DataError) Unwrap() error + type HashingAlgorithm struct + FetchHasher func() hash.Hash + Hash crypto.Hash + Name string + type HashingError struct + func NewHashingError(message string, err error) *HashingError + func (he *HashingError) Error() string + func (he *HashingError) Unwrap() error + type InitialisationError struct + func NewInitialisationError(message string, err error) *InitialisationError + func (ie *InitialisationError) Error() string + func (ie *InitialisationError) Unwrap() error + type InternalError struct + func NewInternalError(message string, err error) *InternalError + func (ie *InternalError) Error() string + func (ie *InternalError) Unwrap() error + type KeyIDMetadata func(keyID string) (crypto.PublicKey, crypto.Hash, error) + type MessageSigner struct + func NewMessageSigner(algo crypto.Hash, signer Signer, publicKeyID string, targetHeader TargetHeader) (*MessageSigner, error) + func (ms *MessageSigner) SignRequest(req *http.Request, signatureHeaders []string) (*http.Request, error) + type MessageVerifier struct + func NewMessageVerifier(keyIDMetadataFn KeyIDMetadata) *MessageVerifier + func (mv *MessageVerifier) VerifyRequest(req *http.Request) error + func (mv *MessageVerifier) WithRequiredHeaders(headers []string) *MessageVerifier + type NewVerifier func(publicKey crypto.PublicKey, cryptoHash crypto.Hash) (Verifier, error) + type RSASigner struct + func (r *RSASigner) Sign(rand io.Reader, content []byte) ([]byte, error) + func (r *RSASigner) String() string + type RSAVerifier struct + func (r *RSAVerifier) Verify(signature, content []byte) error + type SignatureError struct + func NewSignatureError(message string, err error) *SignatureError + func (se *SignatureError) Error() string + func (se *SignatureError) Unwrap() error + type Signer interface + Sign func(rand io.Reader, content []byte) ([]byte, error) + String func() string + func NewRSASigner(privateKey *rsa.PrivateKey, algo crypto.Hash) (Signer, error) + type SigningError struct + func NewSigningError(message string, err error) *SigningError + func (se *SigningError) Error() string + func (se *SigningError) Unwrap() error + type TargetHeader string + const Authorization + const Signature + type ValidationError struct + func NewValidationError(message string) *ValidationError + func (ve *ValidationError) Error() string + type VerificationError struct + func NewVerificationError(message string, err error) *VerificationError + func (ve *VerificationError) Error() string + func (ve *VerificationError) Unwrap() error + type Verifier interface + Verify func(signature, content []byte) error + func NewRSAVerifier(publicKey crypto.PublicKey, algo crypto.Hash) (Verifier, error)