*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
static const unsigned char cfb_key[16] = {
0xe1, 0xf0, 0xc3, 0xd2, 0xa5, 0xb4, 0x87, 0x96,
static const unsigned char cfb_key[16] = {
0xe1, 0xf0, 0xc3, 0xd2, 0xa5, 0xb4, 0x87, 0x96,
IDEA_set_encrypt_key(k, &key);
IDEA_set_decrypt_key(&key, &dkey);
memcpy(iv, k, sizeof(iv));
IDEA_set_encrypt_key(k, &key);
IDEA_set_decrypt_key(&key, &dkey);
memcpy(iv, k, sizeof(iv));
- IDEA_cbc_encrypt((const unsigned char *)text, out, text_len, &key, iv, 1);
+ IDEA_cbc_encrypt(text, out, text_len, &key, iv, 1);
memcpy(iv, k, sizeof(iv));
IDEA_cbc_encrypt(out, out, IDEA_BLOCK, &dkey, iv, 0);
IDEA_cbc_encrypt(&out[8], &out[8], text_len - 8, &dkey, iv, 0);
memcpy(iv, k, sizeof(iv));
IDEA_cbc_encrypt(out, out, IDEA_BLOCK, &dkey, iv, 0);
IDEA_cbc_encrypt(&out[8], &out[8], text_len - 8, &dkey, iv, 0);