*
*/
-#include <stddef.h>
+#include "modes.h"
#include <string.h>
#ifndef MODES_DEBUG
#endif
#include <assert.h>
-#include "modes.h"
-
#define STRICT_ALIGNMENT 1
#if defined(__i386) || defined(__i386__) || \
defined(__x86_64) || defined(__x86_64__) || \
void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
- unsigned char ivec[16], block_f block)
+ unsigned char ivec[16], block128_f block)
{
size_t n;
const unsigned char *iv = ivec;
void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
- unsigned char ivec[16], block_f block)
+ unsigned char ivec[16], block128_f block)
{
size_t n;
union { size_t align; unsigned char c[16]; } tmp;
*
*/
-#include <stddef.h>
+#include "modes.h"
#include <string.h>
#ifndef MODES_DEBUG
#endif
#include <assert.h>
-#include "modes.h"
-
#define STRICT_ALIGNMENT
#if defined(__i386) || defined(__i386__) || \
defined(__x86_64) || defined(__x86_64__) || \
void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
unsigned char ivec[16], int *num,
- int enc, block_f block)
+ int enc, block128_f block)
{
unsigned int n;
size_t l = 0;
static void cfbr_encrypt_block(const unsigned char *in,unsigned char *out,
int nbits,const void *key,
unsigned char ivec[16],int enc,
- block_f block)
+ block128_f block)
{
int n,rem,num;
unsigned char ovec[16*2 + 1]; /* +1 because we dererefence (but don't use) one byte off the end */
void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out,
size_t bits, const void *key,
unsigned char ivec[16], int *num,
- int enc, block_f block)
+ int enc, block128_f block)
{
size_t n;
unsigned char c[1],d[1];
void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const void *key,
unsigned char ivec[16], int *num,
- int enc, block_f block)
+ int enc, block128_f block)
{
size_t n;
*
*/
-#include <stddef.h>
+#include "modes.h"
#include <string.h>
#ifndef MODES_DEBUG
#endif
#include <assert.h>
-#include "modes.h"
-
typedef unsigned int u32;
typedef unsigned char u8;
void CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
unsigned char ivec[16], unsigned char ecount_buf[16],
- unsigned int *num, block_f block)
+ unsigned int *num, block128_f block)
{
unsigned int n;
size_t l=0;
-typedef void (*block_f)(const unsigned char in[16],
+/* ====================================================================
+ * Copyright (c) 2008 The OpenSSL Project. All rights reserved.
+ *
+ * Rights for redistribution and usage in source and binary
+ * forms are granted according to the OpenSSL license.
+ */
+
+#include <stddef.h>
+
+typedef void (*block128_f)(const unsigned char in[16],
unsigned char out[16],
const void *key);
void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
- unsigned char ivec[16], block_f block);
+ unsigned char ivec[16], block128_f block);
void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
- unsigned char ivec[16], block_f block);
+ unsigned char ivec[16], block128_f block);
void CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
unsigned char ivec[16], unsigned char ecount_buf[16],
- unsigned int *num, block_f block);
+ unsigned int *num, block128_f block);
void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
unsigned char ivec[16], int *num,
- block_f block);
+ block128_f block);
void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
unsigned char ivec[16], int *num,
- int enc, block_f block);
+ int enc, block128_f block);
void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const void *key,
unsigned char ivec[16], int *num,
- int enc, block_f block);
+ int enc, block128_f block);
void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out,
size_t bits, const void *key,
unsigned char ivec[16], int *num,
- int enc, block_f block);
-
+ int enc, block128_f block);
*
*/
-#include <stddef.h>
+#include "modes.h"
#include <string.h>
#ifndef MODES_DEBUG
#endif
#include <assert.h>
-#include "modes.h"
-
#define STRICT_ALIGNMENT
#if defined(__i386) || defined(__i386__) || \
defined(__x86_64) || defined(__x86_64__) || \
void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
unsigned char ivec[16], int *num,
- block_f block)
+ block128_f block)
{
unsigned int n;
size_t l=0;