github.com/pion/dtls/v2@v2.2.12/pkg/crypto/signature/signature.go (about)

     1  // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
     2  // SPDX-License-Identifier: MIT
     3  
     4  // Package signature provides our implemented Signature Algorithms
     5  package signature
     6  
     7  // Algorithm as defined in TLS 1.2
     8  // https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-16
     9  type Algorithm uint16
    10  
    11  // SignatureAlgorithm enums
    12  const (
    13  	Anonymous Algorithm = 0
    14  	RSA       Algorithm = 1
    15  	ECDSA     Algorithm = 3
    16  	Ed25519   Algorithm = 7
    17  )
    18  
    19  // Algorithms returns all implemented Signature Algorithms
    20  func Algorithms() map[Algorithm]struct{} {
    21  	return map[Algorithm]struct{}{
    22  		Anonymous: {},
    23  		RSA:       {},
    24  		ECDSA:     {},
    25  		Ed25519:   {},
    26  	}
    27  }