75 #ifdef POK_NEEDS_PROTOCOLS_BLOWFISH
77 #include <libc/stdio.h>
78 #include <libc/string.h>
84 #define FIPS_NON_FIPS_VCIPHER_Init(alg) \
85 void alg##_set_key(alg##_KEY *key, int len, const unsigned char *data)
87 FIPS_NON_FIPS_VCIPHER_Init(BF)
91 const unsigned char *d,*end;
94 memcpy(key,&bf_init,
sizeof(
BF_KEY));
97 if (len > ((BF_ROUNDS+2)*4)) len=(BF_ROUNDS+2)*4;
101 for (i=0; i<(BF_ROUNDS+2); i++)
104 if (d >= end) d=data;
108 if (d >= end) d=data;
112 if (d >= end) d=data;
116 if (d >= end) d=data;
123 for (i=0; i<(BF_ROUNDS+2); i+=2)
131 for (i=0; i<4*256; i+=2)