1
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
3
* LibTomCrypt is a library that provides various cryptographic
4
* algorithms in a highly modular and flexible manner.
6
* The library is free for all purposes without any express
9
* Tom St Denis, tomstdenis@iahu.ca, http://libtomcrypt.org
15
int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key,
16
int keylen, int num_rounds, symmetric_OFB *ofb)
24
if ((err = cipher_is_valid(cipher)) != CRYPT_OK) {
30
ofb->blocklen = cipher_descriptor[cipher].block_length;
31
for (x = 0; x < ofb->blocklen; x++) {
36
ofb->padlen = ofb->blocklen;
37
return cipher_descriptor[cipher].setup(key, keylen, num_rounds, &ofb->key);