1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

ciphers: Documented return values of init functions

This commit is contained in:
Mathias Tausig 2016-10-04 09:30:22 +02:00
parent 8e75df4939
commit bc3f49a7d0
4 changed files with 9 additions and 6 deletions

View File

@ -85,8 +85,8 @@ static const uint32_t bigbyte[24] = {
* @param keySize the size of the key
*
* @return Whether initialization was successful. The command may be
* unsuccessful if the key size is not valid.
* @return 1 if the initialization was successful or 0 in case of an error.
* The command may be unsuccessful if the key size is not valid.
*/
int tripledes_init(cipher_context_t *context, const uint8_t* key, uint8_t keySize);

View File

@ -80,8 +80,8 @@ typedef struct {
* @param keySize the size of the key
* @param key a pointer to the key
*
* @return Whether initialization was successful. The command may be
* unsuccessful if the key size is not valid.
* @return 1 if the initialization was successful or 0 in case of an error.
* The command may be unsuccessful if the key size is not valid.
*/
int aes_init(cipher_context_t *context, const uint8_t *key, uint8_t keySize);

View File

@ -126,6 +126,9 @@ typedef struct {
* @param cipher_id cipher algorithm id
* @param key encryption key to use
* @param key_size length of the encryption key
*
* @return 1 if the initialization was successful or 0 in case of an error.
* The command may be unsuccessful if the key size is not valid.
*/
int cipher_init(cipher_t* cipher, cipher_id_t cipher_id, const uint8_t* key,
uint8_t key_size);

View File

@ -222,8 +222,8 @@ typedef struct {
* @param key_size key size in bytes
* @param key pointer to the key
*
* @return Whether initialization was successful. The command may be
* unsuccessful if the key size is not valid.
* @return 1 if the initialization was successful or 0 in case of an error.
* The command may be unsuccessful if the key size is not valid.
*/
int twofish_init(cipher_context_t *context, const uint8_t *key, uint8_t key_size);