In all of the examples I am using the same key A9F8C082D1A74A61F082DEF40893934860C63E273032FC27D12450E4. I can encrypt a number of credit card type values such as 378700010000011 that are 15 characters long that will yield a 15 char encrypted result; however, when I encrypt a value like 378700010000010 the result is a 14 length value. When this happens the decrypted results are incorrect. Can someone help me for a fee or whatever is necessary to solve this problem?
This is my encrypting routine

void encrypt(char *inbuf, char *outbuf, int blklen, char *key)
{  int counter = 0;  char iv[8];
BF_KEY keyStruct;
memset(iv, 0, 8);
BF_set_key(&keyStruct, strlen(key), key);
BF_cfb64_encrypt(inbuf, outbuf, blklen, &keyStruct,  iv, &counter,
BF_ENCRYPT);

}
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to