This commit is contained in:
Zhi Guan
2015-08-15 15:02:15 +08:00
parent 06df2fab54
commit 3bdc0ea895
2536 changed files with 417052 additions and 271997 deletions

20
crypto/sms4/sms4_ofb.c Normal file
View File

@@ -0,0 +1,20 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "sms4.h"
#ifndef MODES_DEBUG
# ifndef NDEBUG
# define NDEBUG
# endif
#endif
#include <assert.h>
void sms4_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const sms4_key_t *key,
unsigned char ivec[SMS4_BLOCK_SIZE],
unsigned int *num) {
CRYPTO_ofb128_encrypt(in,out,length,key,ivec,num,(block128_f)sms4_encrypt);
}
//cprefix##_ofb##cbits##_encrypt