21 #ifdef POK_NEEDS_PROTOCOLS_BLOWFISH
26 #include <libc/string.h>
27 #include <libc/stdio.h>
29 #include <protocols/blowfish.h>
31 static unsigned char cbc_key [16]=POK_BLOWFISH_KEY;
40 void pok_protocols_blowfish_marshall (
void* uncrypted_data,
size_t uncrypted_size,
void* crypted_data,
size_t* crypted_size)
42 (void) uncrypted_size;
45 BF_set_key(&key,16,cbc_key);
48 BF_ecb_encrypt(uncrypted_data,crypted_data,&key,BF_ENCRYPT);
53 void pok_protocols_blowfish_unmarshall (
void* crypted_data,
size_t crypted_size,
void* uncrypted_data,
size_t* uncrypted_size)
60 BF_set_key(&key,16,cbc_key);
64 BF_ecb_encrypt(crypted_data,uncrypted_data, &key,BF_DECRYPT);