]>
git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/cast/c_cfb64.c
7bac5c72df1d84f49602c02fa751204d1eb71bbd
2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 #include <openssl/cast.h>
14 * The input and output encrypted as though 64bit cfb mode is being used.
15 * The extra state information to record how much of the 64bit block we have
16 * used is contained in *num;
19 void CAST_cfb64_encrypt(const unsigned char *in
, unsigned char *out
,
20 long length
, const CAST_KEY
*schedule
,
21 unsigned char *ivec
, int *num
, int enc
)
23 register CAST_LONG v0
, v1
, t
;
24 register int n
= *num
;
25 register long l
= length
;
27 unsigned char *iv
, c
, cc
;
37 CAST_encrypt((CAST_LONG
*)ti
, schedule
);
57 CAST_encrypt((CAST_LONG
*)ti
, schedule
);
72 v0
= v1
= ti
[0] = ti
[1] = t
= c
= cc
= 0;