package signaturehash

import "github.com/pion/dtls/v3/pkg/crypto/signaturehash"

Package signaturehash provides the SignatureHashAlgorithm as defined in TLS 1.2

Index

Types

type Algorithm

type Algorithm struct {
	Hash      hash.Algorithm
	Signature signature.Algorithm
}

Algorithm is a signature/hash algorithm pairs which may be used in digital signatures.

https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1

func Algorithms

func Algorithms() []Algorithm

Algorithms are all the know SignatureHash Algorithms

func ParseSignatureSchemes

func ParseSignatureSchemes(sigs []tls.SignatureScheme, insecureHashes bool) ([]Algorithm, error)

ParseSignatureSchemes translates []tls.SignatureScheme to []signatureHashAlgorithm. It returns default signature scheme list if no SignatureScheme is passed.

func SelectSignatureScheme

func SelectSignatureScheme(sigs []Algorithm, privateKey crypto.PrivateKey) (Algorithm, error)

SelectSignatureScheme returns most preferred and compatible scheme.

Source Files

errors.go signaturehash.go

Version
v3.0.4 (latest)
Published
Nov 4, 2024
Platform
linux/amd64
Imports
9 packages
Last checked
1 week ago

Tools for package owners.