API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ICIPHERFACTORY

Brew Release
Brew MP 1.0.2
Description

Because of the number of options when creating the correct algorithm and modes for an ICipher1, the ICipherFactory is used to instanciate ICipher1s rather than using CreateInstance(). The factory selects from the available implementations the correct algorithm, mode and padding features desired.
Each ICipher1 algorithm (i.e. DES, AES) may have multiple implementations, depending on the platform. Ciphers may be implemented in software, by a DSP or dedicated hardware. Implementations are not required to support all of the possible chaining modes or padding styles. The factory (in conjunction with the ICipherWrapper classes) determines how to best assemble the cipher components to provide the requested functionality.
For each cipher algorithm there is an abstract 'best fit' class Id which the factory uses to select the best available implementation for the current platform (generally this implies the fastest implementation). This allows application developers to more easily develop platform independent code.
The following header file is required: AEEICipherFactory.h
Usage
To create an ICipher1, first create an ICipherFactory and pass the cipher attributes to ICipherFactory_CreateCipher or ICipherFactory_CreateCipher2. ICipher1's should only be created with ICipherFactory.