github.com/pion/dtls/v2@v2.2.12/pkg/protocol/extension/srtp_protection_profile.go (about)

     1  // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
     2  // SPDX-License-Identifier: MIT
     3  
     4  package extension
     5  
     6  // SRTPProtectionProfile defines the parameters and options that are in effect for the SRTP processing
     7  // https://tools.ietf.org/html/rfc5764#section-4.1.2
     8  type SRTPProtectionProfile uint16
     9  
    10  const (
    11  	SRTP_AES128_CM_HMAC_SHA1_80 SRTPProtectionProfile = 0x0001 // nolint
    12  	SRTP_AES128_CM_HMAC_SHA1_32 SRTPProtectionProfile = 0x0002 // nolint
    13  	SRTP_AES256_CM_SHA1_80      SRTPProtectionProfile = 0x0003 // nolint
    14  	SRTP_AES256_CM_SHA1_32      SRTPProtectionProfile = 0x0004 // nolint
    15  	SRTP_NULL_HMAC_SHA1_80      SRTPProtectionProfile = 0x0005 // nolint
    16  	SRTP_NULL_HMAC_SHA1_32      SRTPProtectionProfile = 0x0006 // nolint
    17  	SRTP_AEAD_AES_128_GCM       SRTPProtectionProfile = 0x0007 // nolint
    18  	SRTP_AEAD_AES_256_GCM       SRTPProtectionProfile = 0x0008 // nolint
    19  )
    20  
    21  func srtpProtectionProfiles() map[SRTPProtectionProfile]bool {
    22  	return map[SRTPProtectionProfile]bool{
    23  		SRTP_AES128_CM_HMAC_SHA1_80: true,
    24  		SRTP_AES128_CM_HMAC_SHA1_32: true,
    25  		SRTP_AES256_CM_SHA1_80:      true,
    26  		SRTP_AES256_CM_SHA1_32:      true,
    27  		SRTP_NULL_HMAC_SHA1_80:      true,
    28  		SRTP_NULL_HMAC_SHA1_32:      true,
    29  		SRTP_AEAD_AES_128_GCM:       true,
    30  		SRTP_AEAD_AES_256_GCM:       true,
    31  	}
    32  }