package hash
import "github.com/pion/dtls/v3/pkg/crypto/hash"
Package hash provides TLS HashAlgorithm as defined in TLS 1.2
Index ¶
Functions ¶
func Algorithms ¶
func Algorithms() map[Algorithm]struct{}
Algorithms returns all the supported Hash Algorithms
Types ¶
type Algorithm ¶
type Algorithm uint16
Algorithm is used to indicate the hash algorithm used https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
const ( None Algorithm = 0 // Blacklisted MD5 Algorithm = 1 // Blacklisted SHA1 Algorithm = 2 // Blacklisted SHA224 Algorithm = 3 SHA256 Algorithm = 4 SHA384 Algorithm = 5 SHA512 Algorithm = 6 Ed25519 Algorithm = 8 )
Supported hash algorithms
func (Algorithm) CryptoHash ¶
CryptoHash returns the crypto.Hash implementation for the given HashAlgorithm
func (Algorithm) Digest ¶
Digest performs a digest on the passed value
func (Algorithm) Insecure ¶
Insecure returns if the given HashAlgorithm is considered secure in DTLS 1.2
func (Algorithm) String ¶
String makes hashAlgorithm printable
Source Files ¶
- Version
- v3.0.4 (latest)
- Published
- Nov 4, 2024
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 1 week ago –
Tools for package owners.