- return value cleanup

This commit is contained in:
Martin Willi
2005-11-28 20:29:47 +00:00
parent 3fe058703f
commit d048df5cab
85 changed files with 1086 additions and 2680 deletions
+10 -9
View File
@@ -68,8 +68,9 @@ struct crypter_t {
* @param data data to encrypt
* @param iv iv
* @param [out]encrypted pointer where the encrypted bytes will be written
* @return
* - SUCCESS in any case
* @return
* - SUCCESS, or
* - INVALID_ARG if data size not a multiple of block size
*/
status_t (*encrypt) (crypter_t *this, chunk_t data, chunk_t iv, chunk_t *encrypted);
@@ -81,8 +82,9 @@ struct crypter_t {
* @param data data to decrypt
* @param iv iv
* @param [out]encrypted pointer where the decrypted bytes will be written
* @return
* - SUCCESS in any case
* @return
* - SUCCESS, or
* - INVALID_ARG if data size not a multiple of block size
*/
status_t (*decrypt) (crypter_t *this, chunk_t data, chunk_t iv, chunk_t *decrypted);
@@ -100,7 +102,8 @@ struct crypter_t {
* @param this calling crypter
* @param key key to set
* @return
* - SUCCESS in any case
* - SUCCESS, or
* - INVALID_ARG if key size != block size
*/
status_t (*set_key) (crypter_t *this, chunk_t key);
@@ -108,10 +111,8 @@ struct crypter_t {
* @brief Destroys a crypter_t object.
*
* @param this crypter_t object to destroy
* @return
* - SUCCESS in any case
*/
status_t (*destroy) (crypter_t *this);
void (*destroy) (crypter_t *this);
};
/**
@@ -121,7 +122,7 @@ struct crypter_t {
* @param blocksize block size in bytes
* @return
* - crypter_t if successfully
* - NULL if out of ressources or crypter not supported
* - NULL if crypter not supported
*/
crypter_t *crypter_create(encryption_algorithm_t encryption_algorithm, size_t blocksize);