| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * aes_icm.h | 2  * aes_icm.h | 
| 3  * | 3  * | 
| 4  * Header for AES Integer Counter Mode. | 4  * Header for AES Integer Counter Mode. | 
| 5  * | 5  * | 
| 6  * David A. McGrew | 6  * David A. McGrew | 
| 7  * Cisco Systems, Inc. | 7  * Cisco Systems, Inc. | 
| 8  * | 8  * | 
| 9  */ | 9  */ | 
|  | 10 | 
| 10 /* | 11 /* | 
| 11  * | 12  * | 
| 12  * Copyright (c) 2001-2006, Cisco Systems, Inc. | 13  * Copyright (c) 2001-2006, Cisco Systems, Inc. | 
| 13  * All rights reserved. | 14  * All rights reserved. | 
| 14  * | 15  * | 
| 15  * Redistribution and use in source and binary forms, with or without | 16  * Redistribution and use in source and binary forms, with or without | 
| 16  * modification, are permitted provided that the following conditions | 17  * modification, are permitted provided that the following conditions | 
| 17  * are met: | 18  * are met: | 
| 18  * | 19  * | 
| 19  *   Redistributions of source code must retain the above copyright | 20  *   Redistributions of source code must retain the above copyright | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 57   int      bytes_in_buffer;        /* number of unused bytes in buffer */ | 58   int      bytes_in_buffer;        /* number of unused bytes in buffer */ | 
| 58 } aes_icm_ctx_t; | 59 } aes_icm_ctx_t; | 
| 59 | 60 | 
| 60 | 61 | 
| 61 err_status_t | 62 err_status_t | 
| 62 aes_icm_context_init(aes_icm_ctx_t *c, | 63 aes_icm_context_init(aes_icm_ctx_t *c, | 
| 63                      const unsigned char *key, | 64                      const unsigned char *key, | 
| 64                      int key_len); | 65                      int key_len); | 
| 65 | 66 | 
| 66 err_status_t | 67 err_status_t | 
| 67 aes_icm_set_iv(aes_icm_ctx_t *c, void *iv); | 68 aes_icm_set_iv(aes_icm_ctx_t *c, void *iv, int direction); | 
| 68 | 69 | 
| 69 err_status_t | 70 err_status_t | 
| 70 aes_icm_encrypt(aes_icm_ctx_t *c, | 71 aes_icm_encrypt(aes_icm_ctx_t *c, | 
| 71                 unsigned char *buf, unsigned int *bytes_to_encr); | 72                 unsigned char *buf, unsigned int *bytes_to_encr); | 
| 72 | 73 | 
| 73 err_status_t | 74 err_status_t | 
| 74 aes_icm_output(aes_icm_ctx_t *c, | 75 aes_icm_output(aes_icm_ctx_t *c, | 
| 75 »              unsigned char *buf, int bytes_to_output); | 76 »              unsigned char *buf, unsigned int bytes_to_output); | 
| 76 | 77 | 
| 77 err_status_t | 78 err_status_t | 
| 78 aes_icm_dealloc(cipher_t *c); | 79 aes_icm_dealloc(cipher_t *c); | 
| 79 | 80 | 
| 80 err_status_t | 81 err_status_t | 
| 81 aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c, | 82 aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c, | 
| 82                          unsigned char *buf, | 83                          unsigned char *buf, | 
| 83                          unsigned int *enc_len, | 84                          unsigned int *enc_len, | 
| 84                          int forIsmacryp); | 85                          int forIsmacryp); | 
| 85 | 86 | 
| 86 err_status_t | 87 err_status_t | 
| 87 aes_icm_alloc_ismacryp(cipher_t **c, | 88 aes_icm_alloc_ismacryp(cipher_t **c, | 
| 88                        int key_len, | 89                        int key_len, | 
| 89                        int forIsmacryp); | 90                        int forIsmacryp); | 
| 90 | 91 | 
|  | 92 uint16_t | 
|  | 93 aes_icm_bytes_encrypted(aes_icm_ctx_t *c); | 
|  | 94 | 
| 91 #endif /* AES_ICM_H */ | 95 #endif /* AES_ICM_H */ | 
| 92 | 96 | 
| OLD | NEW | 
|---|