OpenDOF Project
boolean DOFCipherRegistry_Register ( DOFCipherAlgorithm  algorithm,
DOFCipherStrength  strength,
DOFBlockCipher  cipher 
)

Register a block cipher with the library.

Applications must register the block cipher implementation with this function. For security reasons, once a block cipher is registered, it cannot be replaced.

Note
Only certain DOFCipherStrengths are supported for each DOFCipherAlgorithm: DOFCIPHERALGORITHM_AES - DOFCIPHERSTRENGTH_256, DOFCIPHERALGORITHM_TWOFISH - DOFCIPHERSTRENGTH_256, DOFCIPHERALGORITHM_SMS4 - DOFCIPHERSTRENGTH_128.
Parameters
algorithmThe recognized algorithm to be registered; refer to DOFCipherAlgorithm.
strengthThe security strength as defined by the OpenDof Project; refer to DOFCipherStrength.
cipherThe block cipher implementation; refer to DOFCipher.
Return values
Non-zero(TRUE) if the cipher was successfully added to the registry.
Exceptions
Zero(FALSE) if the cipher could not be added. This may occur for a number of reasons, including:
  • the algorithm is not recognized by the library; or
  • the strength is not recognized by the library; or
  • a cipher was already added for the given algorithm and strength; or
  • the cipher implementation fails to meet the library's requirements for the given algorithm and strength (e.g., incorrect block size, excessive key state size, or missing required functionality).
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22