~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.1.0/third_party/srtp/crypto/include/aes_cbc.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * aes_cbc.h
3
 
 *
4
 
 * Header for AES Cipher Blobk Chaining Mode.
5
 
 *
6
 
 * David A. McGrew
7
 
 * Cisco Systems, Inc.
8
 
 *
9
 
 */
10
 
 
11
 
#ifndef AES_CBC_H
12
 
#define AES_CBC_H
13
 
 
14
 
#include "aes.h"
15
 
#include "cipher.h"
16
 
 
17
 
typedef struct {
18
 
  v128_t   state;                  /* cipher chaining state            */
19
 
  v128_t   previous;               /* previous ciphertext block        */
20
 
  aes_expanded_key_t expanded_key; /* the cipher key                   */
21
 
} aes_cbc_ctx_t;
22
 
 
23
 
err_status_t
24
 
aes_cbc_set_key(aes_cbc_ctx_t *c,
25
 
                const unsigned char *key); 
26
 
 
27
 
err_status_t
28
 
aes_cbc_encrypt(aes_cbc_ctx_t *c, 
29
 
                unsigned char *buf, 
30
 
                unsigned int  *bytes_in_data);
31
 
 
32
 
err_status_t
33
 
aes_cbc_context_init(aes_cbc_ctx_t *c, const uint8_t *key, 
34
 
                     cipher_direction_t dir);
35
 
 
36
 
err_status_t
37
 
aes_cbc_set_iv(aes_cbc_ctx_t *c, void *iv);
38
 
 
39
 
err_status_t
40
 
aes_cbc_nist_encrypt(aes_cbc_ctx_t *c,
41
 
                     unsigned char *data, 
42
 
                     unsigned int *bytes_in_data);
43
 
 
44
 
err_status_t
45
 
aes_cbc_nist_decrypt(aes_cbc_ctx_t *c,
46
 
                     unsigned char *data, 
47
 
                     unsigned int *bytes_in_data);
48
 
 
49
 
#endif /* AES_CBC_H */
50