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

Developer

API Reference

ICIPHERFACTORY_CREATECIPHER2()

Brew Release
Brew MP 1.0.2
See Also
CipherInfo Error Codes ICipher1 ICipherFactory ICipherFactory_CreateCipher()
Description
Creates a cipher with the characteristics specified in a CipherInfo structure.
Params
pICipherFactory
[]:
Pointer to ICipherFactory interface object
pCipherInfo
[]:
Pointer to information on type of cipher to create.
cInfoSize
[]:
Size of structure pointed to by pCipherInfo
ppCipher
[out]:
pointer to returned ICipher1 handle
Interface
Prototype
  •    int ICipherFactory_CreateCipher2(ICipherFactory *pICipherFactory,
                       CipherInfo *pCipherInfo, unsigned cInfoSize, ICipher1 **ppCipher);
    
Return
  • AEE_SUCCESS: class created. AEE_ENOMEMORY: insufficient memory. AEE_ECLASSNOTSUPPORT: class(es) specified are not supported. AEE_EBADPARM: invalid parameter or invalid field for CipherInfo. AEE_CRYPT_INVALID_KEY: key is wrong length or otherwise invalid.
Side Effect
  • None
Comments
Not all of the fields in CipherInfo are required for all ciphers. If the CipherInfo field cKey is zero or pKey is NULL, the key is not initialized. If the CipherInfo field cIV is zero or pIV is NULL, the IV is not initialized.