scapy.layers.tls.crypto.pkcs1
PKCS #1 methods as defined in RFC 3447.
We cannot rely solely on the cryptography library, because the openssl package used by the cryptography library may not implement the md5-sha1 hash, as with Ubuntu or OSX. This is why we reluctantly keep some legacy crypto here.
- class scapy.layers.tls.crypto.pkcs1.MD5_SHA1[源代码]
基类:
HashAlgorithm
- block_size = 64
- digest_size = 36
- name = 'md5-sha1'
- scapy.layers.tls.crypto.pkcs1.pkcs_i2osp(n, sLen)[源代码]
I2OSP conversion function from RFC 3447. The length parameter allows the function to perform the padding needed. Note that the user is responsible for providing a sufficient xLen.
- 参数:
n -- nonnegative integer to be converted
sLen -- intended length of the resulting octet string
- 返回:
corresponding octet string