CsCrypto
1.0.2
|
The CsCrypto API is divided into three layers: driver layer, context layer, and one which provides high-level cryptographic operations.
At the lowest layer are drivers and these consist of source code which will be linked into your application when the driver is enabled at build time. A driver can wrap one or more external libraries or implement the cryptographic operations directly. Although you can develop your own external library we strongly advise only using a well tested and industry standard library. CsCrypto comes with drivers to support OpenSSL
and Botan
.
If you are writing a new driver it must conform to a specific interface which is defined by CsCrypto. There are different interfaces for different categories of operation (e.g. hash functions and symmetric encryption). Each interface defines a context
type which is used by the other layers in CsCrypto. The context is responsible for maintaining the state of a cryptographic operation which is currently in progress.
The next layer provides operations for updating the context byte-for-byte. This layer can contain custom overloads for updating a context. As an example, you can add support to update a context with an object that contains a user defined type. This part of the CsCrypto API is loosely based on "Types Don't Know #" which is a C++ standardization proposal, document number D3980.
This layer provides the API most developers will use in their C++ applications. This includes convenience functions for all currently supported hash functions as well as other user friendly functions that utilize the other two layers.
For all drivers (OpenSSL and Botan) CsCrypto currently supports the following hash functions:
For all drivers CsCrypto supports encryption through AES with Cipher Block Chaining mode with PKCS#7 padding. The following ciphers are supported: