~cpick/mongrel2/release

« back to all changes in this revision

Viewing changes to src/polarssl/padlock.h

  • Committer: Chris Pick
  • Date: 2013-06-30 16:39:57 UTC
  • mfrom: (1106.1.15)
  • Revision ID: git-v1:ec39967acb6bc9867ed9b9dc3774304ca6b9c294
Merge tag 'v1.8.1' into debian

Hotfix for github issue 148

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * \file padlock.h
3
3
 *
 
4
 * \brief VIA PadLock ACE for HW encryption/decryption supported by some processors
 
5
 *
4
6
 *  Copyright (C) 2006-2010, Brainspark B.V.
5
7
 *
6
8
 *  This file is part of PolarSSL (http://www.polarssl.org)
25
27
#ifndef POLARSSL_PADLOCK_H
26
28
#define POLARSSL_PADLOCK_H
27
29
 
28
 
#include "polarssl/aes.h"
 
30
#include "aes.h"
 
31
 
 
32
#define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED               -0x0030  /**< Input data should be aligned. */
29
33
 
30
34
#if defined(POLARSSL_HAVE_ASM) && defined(__GNUC__) && defined(__i386__)
31
35
 
40
44
 
41
45
#define PADLOCK_ALIGN16(x) (unsigned long *) (16 + ((long) x & ~15))
42
46
 
43
 
#define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED                    -0x08E0
44
 
 
45
47
#ifdef __cplusplus
46
48
extern "C" {
47
49
#endif
84
86
 */
85
87
int padlock_xcryptcbc( aes_context *ctx,
86
88
                       int mode,
87
 
                       int length,
 
89
                       size_t length,
88
90
                       unsigned char iv[16],
89
91
                       const unsigned char *input,
90
92
                       unsigned char *output );