scapy.layers.tls.crypto.h_mac

HMAC classes.

exception scapy.layers.tls.crypto.h_mac.HMACError[source]

Bases: Exception

Raised when HMAC verification fails.

scapy.layers.tls.crypto.h_mac.Hmac(key, hashtype)[source]

Return Hmac object from Hash object and key

class scapy.layers.tls.crypto.h_mac.Hmac_MD4(key=None)[source]

Bases: _GenericHMAC

hash_alg[source]

alias of Hash_MD4

hmac_len = 16
key_len = 16
name = 'HMAC-MD4'
class scapy.layers.tls.crypto.h_mac.Hmac_MD5(key=None)[source]

Bases: _GenericHMAC

hash_alg[source]

alias of Hash_MD5

hmac_len = 16
key_len = 16
name = 'HMAC-MD5'
class scapy.layers.tls.crypto.h_mac.Hmac_NULL(key=None)[source]

Bases: _GenericHMAC

digest(tbd)[source]
digest_sslv3(tbd)[source]
hash_alg[source]

alias of Hash_NULL

hmac_len = 0
key_len = 0
name = 'HMAC-NULL'
class scapy.layers.tls.crypto.h_mac.Hmac_SHA(key=None)[source]

Bases: _GenericHMAC

hash_alg[source]

alias of Hash_SHA

hmac_len = 20
key_len = 20
name = 'HMAC-SHA'
class scapy.layers.tls.crypto.h_mac.Hmac_SHA224(key=None)[source]

Bases: _GenericHMAC

hash_alg[source]

alias of Hash_SHA224

hmac_len = 28
key_len = 28
name = 'HMAC-SHA224'
class scapy.layers.tls.crypto.h_mac.Hmac_SHA256(key=None)[source]

Bases: _GenericHMAC

hash_alg[source]

alias of Hash_SHA256

hmac_len = 32
key_len = 32
name = 'HMAC-SHA256'
class scapy.layers.tls.crypto.h_mac.Hmac_SHA384(key=None)[source]

Bases: _GenericHMAC

hash_alg[source]

alias of Hash_SHA384

hmac_len = 48
key_len = 48
name = 'HMAC-SHA384'
class scapy.layers.tls.crypto.h_mac.Hmac_SHA512(key=None)[source]

Bases: _GenericHMAC

hash_alg[source]

alias of Hash_SHA512

hmac_len = 64
key_len = 64
name = 'HMAC-SHA512'