Bases: cinder.openstack.common.crypto.utils.CryptoutilsException
The block size is too big.
Bases: exceptions.Exception
Generic Exception for Crypto utilities.
Bases: object
An HMAC-based Key Derivation Function implementation (RFC5869)
This class creates an object that allows to use HKDF to derive keys.
An expand function that will return arbitrary length output that can be used as keys. Returns a buffer usable as key material.
Parameters: |
|
---|
An extract function that can be used to derive a robust key given weak Input Key Material (IKM) which could be a password. Returns a pseudorandom key (of HashLen octets)
Parameters: |
|
---|
Bases: cinder.openstack.common.crypto.utils.CryptoutilsException
The amount of Key Material asked is too much.
Bases: object
Symmetric Key Crypto object.
This class creates a Symmetric Key Crypto object that can be used to encrypt, decrypt, or sign arbitrary data.
Parameters: |
|
---|
Decrypts the provided ciphertext, optionally base 64 encoded, and returns the plaintext message, after padding is removed.
Uses AES-128-CBC with an IV by default.
Parameters: |
|
---|
Encrypt the provided msg and returns the cyphertext optionally base64 encoded.
Uses AES-128-CBC with a Random IV by default.
The plaintext is padded to reach blocksize length. The last byte of the block is the length of the padding. The length of the padding does not include the length byte itself.
Parameters: |
|
---|---|
Returns encblock: | |
a block of encrypted data. |
Signs a message string and returns a base64 encoded signature.
Uses HMAC-SHA-256 by default.
Parameters: |
|
---|