~ubuntu-branches/ubuntu/vivid/nettle/vivid-proposed

« back to all changes in this revision

Viewing changes to ctr.h

  • Committer: Package Import Robot
  • Author(s): Magnus Holmgren
  • Date: 2013-05-04 19:50:28 UTC
  • mfrom: (1.4.6) (3.1.11 experimental)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20130504195028-fp6c9fw1tsm5scwa
Tags: 2.7-1
* New upstream release (Closes: #706081).
* Include watch file improvements from Bart Martens <bartm@debian.org>
  via the QA system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
/* nettle, low-level cryptographics library
8
8
 *
9
 
 * Copyright (C) 2005 Niels M�ller
 
9
 * Copyright (C) 2005 Niels Möller
10
10
 *  
11
11
 * The nettle library is free software; you can redistribute it and/or modify
12
12
 * it under the terms of the GNU Lesser General Public License as published by
20
20
 * 
21
21
 * You should have received a copy of the GNU Lesser General Public License
22
22
 * along with the nettle library; see the file COPYING.LIB.  If not, write to
23
 
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
24
 
 * MA 02111-1307, USA.
 
23
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
24
 * MA 02111-1301, USA.
25
25
 */
26
26
 
27
27
#ifndef NETTLE_CTR_H_INCLUDED
37
37
#define ctr_crypt nettle_ctr_crypt
38
38
 
39
39
void
40
 
ctr_crypt(void *ctx, nettle_crypt_func f,
 
40
ctr_crypt(void *ctx, nettle_crypt_func *f,
41
41
          unsigned block_size, uint8_t *ctr,
42
42
          unsigned length, uint8_t *dst,
43
43
          const uint8_t *src);
51
51
#define CTR_CRYPT(self, f, length, dst, src)            \
52
52
(0 ? ((f)(&(self)->ctx, 0, NULL, NULL))                 \
53
53
   : ctr_crypt((void *) &(self)->ctx,                   \
54
 
               (nettle_crypt_func) (f),                 \
 
54
               (nettle_crypt_func *) (f),               \
55
55
               sizeof((self)->ctr), (self)->ctr,        \
56
56
               (length), (dst), (src)))
57
57