code
stringlengths
66
870k
docstring
stringlengths
19
26.7k
func_name
stringlengths
1
138
language
stringclasses
1 value
repo
stringlengths
7
68
path
stringlengths
5
324
url
stringlengths
46
389
license
stringclasses
7 values
def encrypt(self, plaintext): """Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext). """ expect_byte_string(plaint...
Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext).
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/ARC4.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/ARC4.py
MIT
def decrypt(self, ciphertext): """Decrypt a piece of data. :Parameters: ciphertext : byte string The piece of data to decrypt. It can be of any size. :Return: the decrypted data (byte string, as long as the ciphertext). """ try: return...
Decrypt a piece of data. :Parameters: ciphertext : byte string The piece of data to decrypt. It can be of any size. :Return: the decrypted data (byte string, as long as the ciphertext).
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/ARC4.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/ARC4.py
MIT
def _create_base_cipher(dict_parameters): """This method instantiates and returns a smart pointer to a low-level base cipher. It will absorb named parameters in the process.""" try: key = dict_parameters.pop("key") except KeyError: raise TypeError("Missing 'key' parameter") exp...
This method instantiates and returns a smart pointer to a low-level base cipher. It will absorb named parameters in the process.
_create_base_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/Blowfish.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/Blowfish.py
MIT
def _create_base_cipher(dict_parameters): """This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.""" try: key = dict_parameters.pop("key") except KeyError: raise TypeError("Missing 'key' parameter") expect_byte_st...
This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.
_create_base_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/CAST.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/CAST.py
MIT
def __init__(self, key, nonce): """Initialize a ChaCha20 cipher object See also `new()` at the module level.""" expect_byte_string(key) expect_byte_string(nonce) self.nonce = nonce self._next = ( self.encrypt, self.decrypt ) self._state = VoidPointer() ...
Initialize a ChaCha20 cipher object See also `new()` at the module level.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
MIT
def encrypt(self, plaintext): """Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext). """ if self.encrypt not in se...
Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext).
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
MIT
def decrypt(self, ciphertext): """Decrypt a piece of data. :Parameters: ciphertext : byte string The piece of data to decrypt. It can be of any size. :Return: the decrypted data (byte string, as long as the ciphertext). """ if self.decrypt not in...
Decrypt a piece of data. :Parameters: ciphertext : byte string The piece of data to decrypt. It can be of any size. :Return: the decrypted data (byte string, as long as the ciphertext).
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
MIT
def seek(self, position): """Seek at a certain position in the key stream. :Parameters: position : integer The absolute position within the key stream, in bytes. """ offset = position & 0x3f position >>= 6 block_low = position & 0xFFFFFFFF ...
Seek at a certain position in the key stream. :Parameters: position : integer The absolute position within the key stream, in bytes.
seek
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
MIT
def new(**kwargs): """Create a new ChaCha20 cipher :Keywords: key : byte string The secret key to use in the symmetric cipher. It must be 32 bytes long. nonce : byte string A mandatory value that must never be reused for any other encryption done with this key. It m...
Create a new ChaCha20 cipher :Keywords: key : byte string The secret key to use in the symmetric cipher. It must be 32 bytes long. nonce : byte string A mandatory value that must never be reused for any other encryption done with this key. It must be 8 bytes long. ...
new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/ChaCha20.py
MIT
def _create_base_cipher(dict_parameters): """This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.""" try: key = dict_parameters.pop("key") except KeyError: raise TypeError("Missing 'key' parameter") expect_byte_st...
This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.
_create_base_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/DES.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/DES.py
MIT
def adjust_key_parity(key_in): """Return the TDES key with parity bits correctly set""" def parity_byte(key_byte): parity = 1 for i in xrange(1, 8): parity ^= (key_byte >> i) & 1 return (key_byte & 0xFE) | parity if len(key_in) not in key_size: raise ValueError(...
Return the TDES key with parity bits correctly set
adjust_key_parity
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/DES3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/DES3.py
MIT
def _create_base_cipher(dict_parameters): """This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.""" try: key_in = dict_parameters.pop("key") except KeyError: raise TypeError("Missing 'key' parameter") key = adjus...
This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.
_create_base_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/DES3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/DES3.py
MIT
def __init__(self, key, hashAlgo, mgfunc, label, randfunc): """Initialize this PKCS#1 OAEP cipher object. :Parameters: key : an RSA key object If a private half is given, both encryption and decryption are possible. If a public half is given, only encryption is ...
Initialize this PKCS#1 OAEP cipher object. :Parameters: key : an RSA key object If a private half is given, both encryption and decryption are possible. If a public half is given, only encryption is possible. hashAlgo : hash object The hash func...
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/PKCS1_OAEP.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/PKCS1_OAEP.py
MIT
def encrypt(self, message): """Produce the PKCS#1 OAEP encryption of a message. This function is named ``RSAES-OAEP-ENCRYPT``, and is specified in section 7.1.1 of RFC3447. :Parameters: message : byte string The message to encrypt, also known as plaintext. It c...
Produce the PKCS#1 OAEP encryption of a message. This function is named ``RSAES-OAEP-ENCRYPT``, and is specified in section 7.1.1 of RFC3447. :Parameters: message : byte string The message to encrypt, also known as plaintext. It can be of variable lengt...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/PKCS1_OAEP.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/PKCS1_OAEP.py
MIT
def decrypt(self, ct): """Decrypt a PKCS#1 OAEP ciphertext. This function is named ``RSAES-OAEP-DECRYPT``, and is specified in section 7.1.2 of RFC3447. :Parameters: ct : byte string The ciphertext that contains the message to recover. :Return: A byte ...
Decrypt a PKCS#1 OAEP ciphertext. This function is named ``RSAES-OAEP-DECRYPT``, and is specified in section 7.1.2 of RFC3447. :Parameters: ct : byte string The ciphertext that contains the message to recover. :Return: A byte string, the original message. ...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/PKCS1_OAEP.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/PKCS1_OAEP.py
MIT
def new(key, hashAlgo=None, mgfunc=None, label=b(''), randfunc=None): """Return a cipher object `PKCS1OAEP_Cipher` that can be used to perform PKCS#1 OAEP encryption or decryption. :Parameters: key : RSA key object The key to use to encrypt or decrypt the message. This is a `Cryptodome.PublicKey.RSA...
Return a cipher object `PKCS1OAEP_Cipher` that can be used to perform PKCS#1 OAEP encryption or decryption. :Parameters: key : RSA key object The key to use to encrypt or decrypt the message. This is a `Cryptodome.PublicKey.RSA` object. Decryption is only possible if *key* is a private RSA key. ...
new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/PKCS1_OAEP.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/PKCS1_OAEP.py
MIT
def __init__(self, key, randfunc): """Initialize this PKCS#1 v1.5 cipher object. :Parameters: key : an RSA key object If a private half is given, both encryption and decryption are possible. If a public half is given, only encryption is possible. randfunc : callabl...
Initialize this PKCS#1 v1.5 cipher object. :Parameters: key : an RSA key object If a private half is given, both encryption and decryption are possible. If a public half is given, only encryption is possible. randfunc : callable Function that returns random bytes...
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/PKCS1_v1_5.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/PKCS1_v1_5.py
MIT
def encrypt(self, message): """Produce the PKCS#1 v1.5 encryption of a message. This function is named ``RSAES-PKCS1-V1_5-ENCRYPT``, and is specified in section 7.2.1 of RFC3447. For a complete example see `Cryptodome.Cipher.PKCS1_v1_5`. :Parameters: message : byte str...
Produce the PKCS#1 v1.5 encryption of a message. This function is named ``RSAES-PKCS1-V1_5-ENCRYPT``, and is specified in section 7.2.1 of RFC3447. For a complete example see `Cryptodome.Cipher.PKCS1_v1_5`. :Parameters: message : byte string The message to encr...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/PKCS1_v1_5.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/PKCS1_v1_5.py
MIT
def new(key, randfunc=None): """Return a cipher object `PKCS115_Cipher` that can be used to perform PKCS#1 v1.5 encryption or decryption. :Parameters: key : RSA key object The key to use to encrypt or decrypt the message. This is a `Cryptodome.PublicKey.RSA` object. Decryption is only possible...
Return a cipher object `PKCS115_Cipher` that can be used to perform PKCS#1 v1.5 encryption or decryption. :Parameters: key : RSA key object The key to use to encrypt or decrypt the message. This is a `Cryptodome.PublicKey.RSA` object. Decryption is only possible if *key* is a private RSA key. ...
new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/PKCS1_v1_5.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/PKCS1_v1_5.py
MIT
def __init__(self, key, nonce): """Initialize a Salsa20 cipher object See also `new()` at the module level.""" if len(key) not in key_size: raise ValueError("Incorrect key length for Salsa20 (%d bytes)" % len(key)) if len(nonce) != 8: raise ValueError("Incorrec...
Initialize a Salsa20 cipher object See also `new()` at the module level.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/Salsa20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/Salsa20.py
MIT
def encrypt(self, plaintext): """Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext). """ expect_byte_string(plaint...
Encrypt a piece of data. :Parameters: plaintext : byte string The piece of data to encrypt. It can be of any size. :Return: the encrypted data (byte string, as long as the plaintext).
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/Salsa20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/Salsa20.py
MIT
def decrypt(self, ciphertext): """Decrypt a piece of data. :Parameters: ciphertext : byte string The piece of data to decrypt. It can be of any size. :Return: the decrypted data (byte string, as long as the ciphertext). """ try: retur...
Decrypt a piece of data. :Parameters: ciphertext : byte string The piece of data to decrypt. It can be of any size. :Return: the decrypted data (byte string, as long as the ciphertext).
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/Salsa20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/Salsa20.py
MIT
def new(key, nonce=None): """Create a new Salsa20 cipher :Parameters: key : byte string The secret key to use in the symmetric cipher. It must be 16 or 32 bytes long. nonce : byte string A value that must never be reused for any other encryption. It must be 8 bytes ...
Create a new Salsa20 cipher :Parameters: key : byte string The secret key to use in the symmetric cipher. It must be 16 or 32 bytes long. nonce : byte string A value that must never be reused for any other encryption. It must be 8 bytes long. If not provided, a...
new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/Salsa20.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/Salsa20.py
MIT
def __init__(self, block_cipher, iv): """Create a new block cipher, configured in CBC mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance. iv : byte string The initialization vector to use for encryption or decr...
Create a new block cipher, configured in CBC mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance. iv : byte string The initialization vector to use for encryption or decryption. It is as long as the cipher b...
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_cbc.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_cbc.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two...
Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two or more pieces and `encrypt` can...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_cbc.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_cbc.py
MIT
def decrypt(self, ciphertext): """Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two...
Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two or more pieces and `decrypt` can ...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_cbc.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_cbc.py
MIT
def _create_cbc_cipher(factory, **kwargs): """Instantiate a cipher object that performs CBC encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. :Keywords: iv : byte string The IV to use for CBC. IV : byte...
Instantiate a cipher object that performs CBC encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. :Keywords: iv : byte string The IV to use for CBC. IV : byte string Alias for ``iv``. Any other k...
_create_cbc_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_cbc.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_cbc.py
MIT
def _update(self, assoc_data_pt=b("")): """Update the MAC with associated data or plaintext (without FSM checks)""" if self._mac_status == MacStatus.NOT_STARTED: self._cache.append(assoc_data_pt) return assert(byte_string(self._cache)) assert(len(self...
Update the MAC with associated data or plaintext (without FSM checks)
_update
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. This method can be called only **once** if ``msg_len`` was ...
Encrypt data with the key set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. This method can be called only **once** if ``msg_len`` was not passed at initialization. ...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
MIT
def decrypt(self, ciphertext): """Decrypt data with the key set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. This method can be called only **once** if ``msg_len`` was ...
Decrypt data with the key set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. This method can be called only **once** if ``msg_len`` was not passed at initialization. ...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
MIT
def digest(self): """Compute the *binary* MAC tag. The caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext. :Return: the MAC, as a byte string. """ if self.digest not in sel...
Compute the *binary* MAC tag. The caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext. :Return: the MAC, as a byte string.
digest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
MIT
def verify(self, received_mac_tag): """Validate the *binary* MAC tag. The caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit. :Par...
Validate the *binary* MAC tag. The caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit. :Parameters: received_mac_tag : byte stri...
verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
MIT
def decrypt_and_verify(self, ciphertext, received_mac_tag): """Perform decrypt() and verify() in one step. :Parameters: ciphertext : byte string The piece of data to decrypt. received_mac_tag : byte string This is the *binary* MAC, as received from the sender...
Perform decrypt() and verify() in one step. :Parameters: ciphertext : byte string The piece of data to decrypt. received_mac_tag : byte string This is the *binary* MAC, as received from the sender. :Return: the decrypted data (byte string). :Raises V...
decrypt_and_verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
MIT
def _create_ccm_cipher(factory, **kwargs): """Create a new block cipher, configured in CCM mode. :Parameters: factory : module A symmetric cipher module from `Cryptodome.Cipher` (like `Cryptodome.Cipher.AES`). :Keywords: key : byte string The secret key to use in the sy...
Create a new block cipher, configured in CCM mode. :Parameters: factory : module A symmetric cipher module from `Cryptodome.Cipher` (like `Cryptodome.Cipher.AES`). :Keywords: key : byte string The secret key to use in the symmetric cipher. nonce : byte string ...
_create_ccm_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ccm.py
MIT
def __init__(self, block_cipher, iv, segment_size): """Create a new block cipher, configured in CFB mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance. iv : byte string The initialization vector to use for encr...
Create a new block cipher, configured in CFB mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance. iv : byte string The initialization vector to use for encryption or decryption. It is as long as the cipher b...
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_cfb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_cfb.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two...
Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two or more pieces and `encrypt` can...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_cfb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_cfb.py
MIT
def decrypt(self, ciphertext): """Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two...
Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two or more pieces and `decrypt` can ...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_cfb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_cfb.py
MIT
def _create_cfb_cipher(factory, **kwargs): """Instantiate a cipher object that performs CFB encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. :Keywords: iv : byte string The IV to use for CFB. IV : byte...
Instantiate a cipher object that performs CFB encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. :Keywords: iv : byte string The IV to use for CFB. IV : byte string Alias for ``iv``. segment_s...
_create_cfb_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_cfb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_cfb.py
MIT
def __init__(self, block_cipher, initial_counter_block, prefix_len, counter_len, little_endian): """Create a new block cipher, configured in CTR mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance. initial_...
Create a new block cipher, configured in CTR mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance. initial_counter_block : byte string The initial plaintext to use to generate the key stream. It is as large ...
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ctr.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ctr.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two...
Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two or more pieces and `encrypt` can...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ctr.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ctr.py
MIT
def decrypt(self, ciphertext): """Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two...
Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two or more pieces and `decrypt` can ...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ctr.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ctr.py
MIT
def _create_ctr_cipher(factory, **kwargs): """Instantiate a cipher object that performs CTR encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. :Keywords: nonce : binary string The fixed part at the beginning of...
Instantiate a cipher object that performs CTR encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. :Keywords: nonce : binary string The fixed part at the beginning of the counter block - the rest is the count...
_create_ctr_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ctr.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ctr.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two...
Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two or more pieces and `encrypt` can...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
MIT
def decrypt(self, ciphertext): """Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two...
Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two or more pieces and `decrypt` can ...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
MIT
def digest(self): """Compute the *binary* MAC tag. The caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext. :Return: the MAC, as a byte string. """ if self.digest not in sel...
Compute the *binary* MAC tag. The caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext. :Return: the MAC, as a byte string.
digest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
MIT
def verify(self, received_mac_tag): """Validate the *binary* MAC tag. The caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit. :Par...
Validate the *binary* MAC tag. The caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit. :Parameters: received_mac_tag : byte stri...
verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
MIT
def decrypt_and_verify(self, ciphertext, received_mac_tag): """Perform decrypt() and verify() in one step. :Parameters: ciphertext : byte string The piece of data to decrypt. received_mac_tag : byte string This is the *binary* MAC, as received from the sender...
Perform decrypt() and verify() in one step. :Parameters: ciphertext : byte string The piece of data to decrypt. received_mac_tag : byte string This is the *binary* MAC, as received from the sender. :Return: the decrypted data (byte string). :Raises M...
decrypt_and_verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
MIT
def _create_eax_cipher(factory, **kwargs): """Create a new block cipher, configured in EAX mode. :Parameters: factory : module A symmetric cipher module from `Cryptodome.Cipher` (like `Cryptodome.Cipher.AES`). :Keywords: key : byte string The secret key to use in the sy...
Create a new block cipher, configured in EAX mode. :Parameters: factory : module A symmetric cipher module from `Cryptodome.Cipher` (like `Cryptodome.Cipher.AES`). :Keywords: key : byte string The secret key to use in the symmetric cipher. nonce : byte string ...
_create_eax_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_eax.py
MIT
def __init__(self, block_cipher): """Create a new block cipher, configured in ECB mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance. """ self._state = VoidPointer() result = raw_ecb_lib.ECB_start_operation(b...
Create a new block cipher, configured in ECB mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ecb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ecb.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key set at initialization. The data to encrypt can be broken up in two or more pieces and `encrypt` can be called multiple times. That is, the statement: >>> c.encrypt(a) + c.encrypt(b) is equivalent to: ...
Encrypt data with the key set at initialization. The data to encrypt can be broken up in two or more pieces and `encrypt` can be called multiple times. That is, the statement: >>> c.encrypt(a) + c.encrypt(b) is equivalent to: >>> c.encrypt(a+b) This...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ecb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ecb.py
MIT
def decrypt(self, ciphertext): """Decrypt data with the key set at initialization. The data to decrypt can be broken up in two or more pieces and `decrypt` can be called multiple times. That is, the statement: >>> c.decrypt(a) + c.decrypt(b) is equivalent to: ...
Decrypt data with the key set at initialization. The data to decrypt can be broken up in two or more pieces and `decrypt` can be called multiple times. That is, the statement: >>> c.decrypt(a) + c.decrypt(b) is equivalent to: >>> c.decrypt(a+b) This...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ecb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ecb.py
MIT
def _create_ecb_cipher(factory, **kwargs): """Instantiate a cipher object that performs ECB encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. All keywords are passed to the underlying block cipher. See the relevant docu...
Instantiate a cipher object that performs ECB encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. All keywords are passed to the underlying block cipher. See the relevant documentation for details (at least ``key`` will need ...
_create_ecb_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ecb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ecb.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two...
Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two or more pieces and `encrypt` can...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
MIT
def decrypt(self, ciphertext): """Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two...
Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two or more pieces and `decrypt` can ...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
MIT
def digest(self): """Compute the *binary* MAC tag in an AEAD mode. The caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext. :Return: the MAC, as a byte string. """ if self.d...
Compute the *binary* MAC tag in an AEAD mode. The caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext. :Return: the MAC, as a byte string.
digest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
MIT
def _compute_mac(self): """Compute MAC without any FSM checks.""" if self._tag: return self._tag # Step 5 in NIST SP 800-38D, Algorithm 4 - Compute S self._pad_cache_and_update() self._update(long_to_bytes(8 * self._auth_len, 8)) self._update(long_to_bytes(8...
Compute MAC without any FSM checks.
_compute_mac
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
MIT
def verify(self, received_mac_tag): """Validate the *binary* MAC tag. The caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit. :Par...
Validate the *binary* MAC tag. The caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit. :Parameters: received_mac_tag : byte stri...
verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
MIT
def decrypt_and_verify(self, ciphertext, received_mac_tag): """Perform decrypt() and verify() in one step. :Parameters: ciphertext : byte string The piece of data to decrypt. received_mac_tag : byte string This is the *binary* MAC, as received from the sender...
Perform decrypt() and verify() in one step. :Parameters: ciphertext : byte string The piece of data to decrypt. received_mac_tag : byte string This is the *binary* MAC, as received from the sender. :Return: the decrypted data (byte string). :Raises V...
decrypt_and_verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
MIT
def _create_gcm_cipher(factory, **kwargs): """Create a new block cipher, configured in Galois Counter Mode (GCM). :Parameters: factory : module A block cipher module, taken from `Cryptodome.Cipher`. The cipher must have block length of 16 bytes. GCM has been only defined for `Cryp...
Create a new block cipher, configured in Galois Counter Mode (GCM). :Parameters: factory : module A block cipher module, taken from `Cryptodome.Cipher`. The cipher must have block length of 16 bytes. GCM has been only defined for `Cryptodome.Cipher.AES`. :Keywords: key : by...
_create_gcm_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_gcm.py
MIT
def encrypt(self, plaintext=None): """Encrypt the next piece of plaintext. After the entire plaintext has been passed (but before `digest`), you **must** call this method one last time with no arguments to collect the final piece of ciphertext. If possible, use the method `encr...
Encrypt the next piece of plaintext. After the entire plaintext has been passed (but before `digest`), you **must** call this method one last time with no arguments to collect the final piece of ciphertext. If possible, use the method `encrypt_and_digest` instead. :Parameters:...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
MIT
def decrypt(self, ciphertext=None): """Decrypt the next piece of ciphertext. After the entire ciphertext has been passed (but before `verify`), you **must** call this method one last time with no arguments to collect the remaining piece of plaintext. If possible, use the method...
Decrypt the next piece of ciphertext. After the entire ciphertext has been passed (but before `verify`), you **must** call this method one last time with no arguments to collect the remaining piece of plaintext. If possible, use the method `decrypt_and_verify` instead. :Parame...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
MIT
def digest(self): """Compute the *binary* MAC tag. Call this method after the final `encrypt` (the one with no arguments) to obtain the MAC tag. The MAC tag is needed by the receiver to determine authenticity of the message. :Return: the MAC, as a byte string. ...
Compute the *binary* MAC tag. Call this method after the final `encrypt` (the one with no arguments) to obtain the MAC tag. The MAC tag is needed by the receiver to determine authenticity of the message. :Return: the MAC, as a byte string.
digest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
MIT
def verify(self, received_mac_tag): """Validate the *binary* MAC tag. Call this method after the final `decrypt` (the one with no arguments) to check if the message is authentic and valid. :Parameters: received_mac_tag : byte string This is the *binary* MAC, as re...
Validate the *binary* MAC tag. Call this method after the final `decrypt` (the one with no arguments) to check if the message is authentic and valid. :Parameters: received_mac_tag : byte string This is the *binary* MAC, as received from the sender. :Raises ValueEr...
verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
MIT
def decrypt_and_verify(self, ciphertext, received_mac_tag): """Decrypted the message and verify its authenticity in one step. :Parameters: ciphertext : byte string The entire message to decrypt. received_mac_tag : byte string This is the *binary* MAC, as rece...
Decrypted the message and verify its authenticity in one step. :Parameters: ciphertext : byte string The entire message to decrypt. received_mac_tag : byte string This is the *binary* MAC, as received from the sender. :Return: the decrypted data (byte string...
decrypt_and_verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
MIT
def _create_ocb_cipher(factory, **kwargs): """Create a new block cipher, configured in OCB mode. :Parameters: factory : module A symmetric cipher module from `Cryptodome.Cipher` (like `Cryptodome.Cipher.AES`). :Keywords: nonce : byte string A value that must never be r...
Create a new block cipher, configured in OCB mode. :Parameters: factory : module A symmetric cipher module from `Cryptodome.Cipher` (like `Cryptodome.Cipher.AES`). :Keywords: nonce : byte string A value that must never be reused for any other encryption. Its length...
_create_ocb_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ocb.py
MIT
def __init__(self, block_cipher, iv): """Create a new block cipher, configured in OFB mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance. iv : byte string The initialization vector to use for encryption or decr...
Create a new block cipher, configured in OFB mode. :Parameters: block_cipher : C pointer A smart pointer to the low-level block cipher instance. iv : byte string The initialization vector to use for encryption or decryption. It is as long as the cipher b...
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ofb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ofb.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two...
Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two or more pieces and `encrypt` can...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ofb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ofb.py
MIT
def decrypt(self, ciphertext): """Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two...
Decrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. The data to decrypt can be broken up in two or more pieces and `decrypt` can ...
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ofb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ofb.py
MIT
def _create_ofb_cipher(factory, **kwargs): """Instantiate a cipher object that performs OFB encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. :Keywords: iv : byte string The IV to use for OFB. IV : byte...
Instantiate a cipher object that performs OFB encryption/decryption. :Parameters: factory : module The underlying block cipher, a module from ``Cryptodome.Cipher``. :Keywords: iv : byte string The IV to use for OFB. IV : byte string Alias for ``iv``. Any other k...
_create_ofb_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_ofb.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_ofb.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two...
Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. The data to encrypt can be broken up in two or more pieces and `encrypt` can...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_openpgp.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_openpgp.py
MIT
def _create_openpgp_cipher(factory, **kwargs): """Create a new block cipher, configured in OpenPGP mode. :Parameters: factory : module The module. :Keywords: key : byte string The secret key to use in the symmetric cipher. IV : byte string The initialization vect...
Create a new block cipher, configured in OpenPGP mode. :Parameters: factory : module The module. :Keywords: key : byte string The secret key to use in the symmetric cipher. IV : byte string The initialization vector to use for encryption or decryption. For e...
_create_openpgp_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_openpgp.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_openpgp.py
MIT
def _create_ctr_cipher(self, mac_tag): """Create a new CTR cipher from the MAC in SIV mode""" tag_int = bytes_to_long(mac_tag) return self._factory.new( self._subkey_cipher, self._factory.MODE_CTR, initial_value=tag_int ^ (tag_int & 0x...
Create a new CTR cipher from the MAC in SIV mode
_create_ctr_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
MIT
def update(self, component): """Protect one associated data component For SIV, the associated data is a sequence (*vector*) of non-empty byte strings (*components*). This method consumes the next component. It must be called once for each of the components that constitue the as...
Protect one associated data component For SIV, the associated data is a sequence (*vector*) of non-empty byte strings (*components*). This method consumes the next component. It must be called once for each of the components that constitue the associated data. Note that the co...
update
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
MIT
def encrypt(self, plaintext): """Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. This method can be called only **once**. ...
Encrypt data with the key and the parameters set at initialization. A cipher object is stateful: once you have encrypted a message you cannot encrypt (or decrypt) another message using the same object. This method can be called only **once**. You cannot reuse an object for enc...
encrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
MIT
def decrypt(self, ciphertext): """Decrypt data with the key and the parameters set at initialization. For SIV, decryption and verification must take place at the same point. This method shall not be used. Use `decrypt_and_verify` instead. """ raise TypeError("decrypt()...
Decrypt data with the key and the parameters set at initialization. For SIV, decryption and verification must take place at the same point. This method shall not be used. Use `decrypt_and_verify` instead.
decrypt
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
MIT
def digest(self): """Compute the *binary* MAC tag. The caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext. :Return: the MAC, as a byte string. """ if self.digest not in sel...
Compute the *binary* MAC tag. The caller invokes this function at the very end. This method returns the MAC that shall be sent to the receiver, together with the ciphertext. :Return: the MAC, as a byte string.
digest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
MIT
def verify(self, received_mac_tag): """Validate the *binary* MAC tag. The caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit. :Par...
Validate the *binary* MAC tag. The caller invokes this function at the very end. This method checks if the decrypted message is indeed valid (that is, if the key is correct) and it has not been tampered with while in transit. :Parameters: received_mac_tag : byte stri...
verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
MIT
def decrypt_and_verify(self, ciphertext, mac_tag): """Perform decryption and verification in one step. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. You cannot reuse an object for encrypting ...
Perform decryption and verification in one step. A cipher object is stateful: once you have decrypted a message you cannot decrypt (or encrypt) another message with the same object. You cannot reuse an object for encrypting or decrypting other data with the same key. T...
decrypt_and_verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
MIT
def _create_siv_cipher(factory, **kwargs): """Create a new block cipher, configured in Synthetic Initializaton Vector (SIV) mode. :Parameters: factory : object A symmetric cipher module from `Cryptodome.Cipher` (like `Cryptodome.Cipher.AES`). :Keywords: key : byte string ...
Create a new block cipher, configured in Synthetic Initializaton Vector (SIV) mode. :Parameters: factory : object A symmetric cipher module from `Cryptodome.Cipher` (like `Cryptodome.Cipher.AES`). :Keywords: key : byte string The secret key to use in the symmetric cip...
_create_siv_cipher
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Cipher/_mode_siv.py
MIT
def update(self, data): """Continue hashing of a message by consuming the next chunk of data. Repeated calls are equivalent to a single call with the concatenation of all the arguments. In other words: >>> m.update(a); m.update(b) is equivalent to: >>> m.update(...
Continue hashing of a message by consuming the next chunk of data. Repeated calls are equivalent to a single call with the concatenation of all the arguments. In other words: >>> m.update(a); m.update(b) is equivalent to: >>> m.update(a+b) :Parameters: ...
update
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
MIT
def digest(self): """Return the **binary** (non-printable) digest of the message that has been hashed so far. You cannot update the hash anymore after the first call to ``digest`` (or ``hexdigest``). :Return: A byte string of `digest_size` bytes. It may contain non-ASCII ...
Return the **binary** (non-printable) digest of the message that has been hashed so far. You cannot update the hash anymore after the first call to ``digest`` (or ``hexdigest``). :Return: A byte string of `digest_size` bytes. It may contain non-ASCII characters, including null...
digest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
MIT
def verify(self, mac_tag): """Verify that a given **binary** MAC (computed by another party) is valid. :Parameters: mac_tag : byte string The expected MAC of the message. :Raises ValueError: if the MAC does not match. It means that the message ...
Verify that a given **binary** MAC (computed by another party) is valid. :Parameters: mac_tag : byte string The expected MAC of the message. :Raises ValueError: if the MAC does not match. It means that the message has been tampered with or that the ...
verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
MIT
def new(self, **kwargs): """Return a new instance of a BLAKE2b hash object.""" if "digest_bytes" not in kwargs and "digest_bits" not in kwargs: kwargs["digest_bytes"] = self.digest_size return new(**kwargs)
Return a new instance of a BLAKE2b hash object.
new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
MIT
def new(**kwargs): """Return a new instance of a BLAKE2b hash object. :Keywords: data : byte string The very first chunk of the message to hash. It is equivalent to an early call to `BLAKE2b_Hash.update()`. digest_bytes : integer The size of the digest, in bytes (1 to 64). ...
Return a new instance of a BLAKE2b hash object. :Keywords: data : byte string The very first chunk of the message to hash. It is equivalent to an early call to `BLAKE2b_Hash.update()`. digest_bytes : integer The size of the digest, in bytes (1 to 64). digest_bits : integer...
new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2b.py
MIT
def update(self, data): """Continue hashing of a message by consuming the next chunk of data. Repeated calls are equivalent to a single call with the concatenation of all the arguments. In other words: >>> m.update(a); m.update(b) is equivalent to: >>> m.update(...
Continue hashing of a message by consuming the next chunk of data. Repeated calls are equivalent to a single call with the concatenation of all the arguments. In other words: >>> m.update(a); m.update(b) is equivalent to: >>> m.update(a+b) :Parameters: ...
update
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
MIT
def digest(self): """Return the **binary** (non-printable) digest of the message that has been hashed so far. You cannot update the hash anymore after the first call to ``digest`` (or ``hexdigest``). :Return: A byte string of `digest_size` bytes. It may contain non-ASCII ...
Return the **binary** (non-printable) digest of the message that has been hashed so far. You cannot update the hash anymore after the first call to ``digest`` (or ``hexdigest``). :Return: A byte string of `digest_size` bytes. It may contain non-ASCII characters, including null...
digest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
MIT
def verify(self, mac_tag): """Verify that a given **binary** MAC (computed by another party) is valid. :Parameters: mac_tag : byte string The expected MAC of the message. :Raises ValueError: if the MAC does not match. It means that the message ...
Verify that a given **binary** MAC (computed by another party) is valid. :Parameters: mac_tag : byte string The expected MAC of the message. :Raises ValueError: if the MAC does not match. It means that the message has been tampered with or that the ...
verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
MIT
def new(self, **kwargs): """Return a new instance of a BLAKE2s hash object.""" if "digest_bytes" not in kwargs and "digest_bits" not in kwargs: kwargs["digest_bytes"] = self.digest_size return new(**kwargs)
Return a new instance of a BLAKE2s hash object.
new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
MIT
def new(**kwargs): """Return a new instance of a BLAKE2s hash object. :Keywords: data : byte string The very first chunk of the message to hash. It is equivalent to an early call to `BLAKE2s_Hash.update()`. digest_bytes : integer The size of the digest, in bytes (1 to 32). ...
Return a new instance of a BLAKE2s hash object. :Keywords: data : byte string The very first chunk of the message to hash. It is equivalent to an early call to `BLAKE2s_Hash.update()`. digest_bytes : integer The size of the digest, in bytes (1 to 32). digest_bits : integer...
new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/BLAKE2s.py
MIT
def __init__(self, key, msg=None, ciphermod=None, cipher_params=None): """Create a new CMAC object. :Parameters: key : byte string secret key for the CMAC object. The key must be valid for the underlying cipher algorithm. For instance, it must be 16 bytes l...
Create a new CMAC object. :Parameters: key : byte string secret key for the CMAC object. The key must be valid for the underlying cipher algorithm. For instance, it must be 16 bytes long for AES-128. msg : byte string The very first chunk of t...
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/CMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/CMAC.py
MIT
def update(self, msg): """Continue authentication of a message by consuming the next chunk of data. Repeated calls are equivalent to a single call with the concatenation of all the arguments. In other words: >>> m.update(a); m.update(b) is equivalent to: ...
Continue authentication of a message by consuming the next chunk of data. Repeated calls are equivalent to a single call with the concatenation of all the arguments. In other words: >>> m.update(a); m.update(b) is equivalent to: >>> m.update(a+b) :Param...
update
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/CMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/CMAC.py
MIT
def _update(self, data_block): """Update a block aligned to the block boundary""" if len(data_block) == 0: return assert len(data_block) % self.digest_size == 0 ct = self._cbc.encrypt(data_block) if len(data_block) == self.digest_size: self._before_last...
Update a block aligned to the block boundary
_update
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/CMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/CMAC.py
MIT
def copy(self): """Return a copy ("clone") of the MAC object. The copy will have the same internal state as the original MAC object. This can be used to efficiently compute the MAC of strings that share a common initial substring. :Returns: A `CMAC` object """ ...
Return a copy ("clone") of the MAC object. The copy will have the same internal state as the original MAC object. This can be used to efficiently compute the MAC of strings that share a common initial substring. :Returns: A `CMAC` object
copy
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/CMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/CMAC.py
MIT
def digest(self): """Return the **binary** (non-printable) MAC of the message that has been authenticated so far. This method does not change the state of the MAC object. You can continue updating the object after calling this function. :Return: A byte string of `digest_size` b...
Return the **binary** (non-printable) MAC of the message that has been authenticated so far. This method does not change the state of the MAC object. You can continue updating the object after calling this function. :Return: A byte string of `digest_size` bytes. It may contain non-ASCI...
digest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/CMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/CMAC.py
MIT
def hexdigest(self): """Return the **printable** MAC of the message that has been authenticated so far. This method does not change the state of the MAC object. :Return: A string of 2* `digest_size` bytes. It contains only hexadecimal ASCII digits. """ return "...
Return the **printable** MAC of the message that has been authenticated so far. This method does not change the state of the MAC object. :Return: A string of 2* `digest_size` bytes. It contains only hexadecimal ASCII digits.
hexdigest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/CMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/CMAC.py
MIT
def verify(self, mac_tag): """Verify that a given **binary** MAC (computed by another party) is valid. :Parameters: mac_tag : byte string The expected MAC of the message. :Raises ValueError: if the MAC does not match. It means that the message ...
Verify that a given **binary** MAC (computed by another party) is valid. :Parameters: mac_tag : byte string The expected MAC of the message. :Raises ValueError: if the MAC does not match. It means that the message has been tampered with or that the ...
verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/CMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/CMAC.py
MIT
def __init__(self, key, msg=b(""), digestmod=None): """Create a new HMAC object. :Parameters: key : byte string secret key for the MAC object. It must be long enough to match the expected security level of the MAC. However, there is no benefit in using keys...
Create a new HMAC object. :Parameters: key : byte string secret key for the MAC object. It must be long enough to match the expected security level of the MAC. However, there is no benefit in using keys longer than the `digest_size` of the underlying ha...
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/HMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/HMAC.py
MIT
def copy(self): """Return a copy ("clone") of the MAC object. The copy will have the same internal state as the original MAC object. This can be used to efficiently compute the MAC of strings that share a common initial substring. :Returns: An `HMAC` object """ ...
Return a copy ("clone") of the MAC object. The copy will have the same internal state as the original MAC object. This can be used to efficiently compute the MAC of strings that share a common initial substring. :Returns: An `HMAC` object
copy
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/HMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/HMAC.py
MIT
def digest(self): """Return the **binary** (non-printable) MAC of the message that has been authenticated so far. This method does not change the state of the MAC object. You can continue updating the object after calling this function. :Return: A byte string of `digest_size` b...
Return the **binary** (non-printable) MAC of the message that has been authenticated so far. This method does not change the state of the MAC object. You can continue updating the object after calling this function. :Return: A byte string of `digest_size` bytes. It may contain non-ASCI...
digest
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/HMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/HMAC.py
MIT
def verify(self, mac_tag): """Verify that a given **binary** MAC (computed by another party) is valid. :Parameters: mac_tag : byte string The expected MAC of the message. :Raises ValueError: if the MAC does not match. It means that the message ...
Verify that a given **binary** MAC (computed by another party) is valid. :Parameters: mac_tag : byte string The expected MAC of the message. :Raises ValueError: if the MAC does not match. It means that the message has been tampered with or that the ...
verify
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/Cryptodome/Hash/HMAC.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/osx64/Cryptodome/Hash/HMAC.py
MIT