Library: Crypto
Package: Cipher
Header: Poco/Crypto/CipherKeyImpl.h
An implementation of the CipherKey class for OpenSSL's crypto library.
Direct Base Classes: Poco::RefCountedObject
All Base Classes: Poco::RefCountedObject
Member Functions: blockSize, cipher, getIV, getKey, ivSize, keySize, mode, name, setIV, setKey
Inherited Functions: duplicate, referenceCount, release
typedef std::vector < unsigned char > ByteVec;
typedef Poco::AutoPtr < CipherKeyImpl > Ptr;
Cipher mode of operation. This mode determines how multiple blocks are connected; this is essential to improve security.
Stream cipher
Electronic codebook (plain concatenation)
Cipher block chaining (default)
Cipher feedback
Output feedback
CipherKeyImpl(
const std::string & name
);
Creates a new CipherKeyImpl object. Autoinitializes key and initialization vector.
CipherKeyImpl(
const std::string & name,
const ByteVec & key,
const ByteVec & iv
);
Creates a new CipherKeyImpl object, using the given cipher name, key and initialization vector.
CipherKeyImpl(
const std::string & name,
const std::string & passphrase,
const std::string & salt,
int iterationCount
);
Creates a new CipherKeyImpl object, using the given cipher name, passphrase, salt value and iteration count.
virtual ~CipherKeyImpl();
Destroys the CipherKeyImpl.
int blockSize() const;
Returns the block size of the Cipher.
const EVP_CIPHER * cipher();
Returns the cipher object
const ByteVec & getIV() const;
Returns the initialization vector (IV) for the Cipher.
const ByteVec & getKey() const;
Returns the key for the Cipher.
int ivSize() const;
Returns the IV size of the Cipher.
int keySize() const;
Returns the key size of the Cipher.
Mode mode() const;
Returns the Cipher's mode of operation.
const std::string & name() const;
Returns the name of the Cipher.
void setIV(
const ByteVec & iv
);
Sets the initialization vector (IV) for the Cipher.
void setKey(
const ByteVec & key
);
Sets the key for the Cipher.