version 1.97, 2013/05/17 00:13:13 |
version 1.98, 2013/11/21 00:45:43 |
|
|
|
|
cipher_set_key_string(&ciphercontext, cipher, passphrase, |
cipher_set_key_string(&ciphercontext, cipher, passphrase, |
CIPHER_ENCRYPT); |
CIPHER_ENCRYPT); |
cipher_crypt(&ciphercontext, cp, |
cipher_crypt(&ciphercontext, 0, cp, |
buffer_ptr(&buffer), buffer_len(&buffer), 0, 0); |
buffer_ptr(&buffer), buffer_len(&buffer), 0, 0); |
cipher_cleanup(&ciphercontext); |
cipher_cleanup(&ciphercontext); |
memset(&ciphercontext, 0, sizeof(ciphercontext)); |
memset(&ciphercontext, 0, sizeof(ciphercontext)); |
|
|
/* Rest of the buffer is encrypted. Decrypt it using the passphrase. */ |
/* Rest of the buffer is encrypted. Decrypt it using the passphrase. */ |
cipher_set_key_string(&ciphercontext, cipher, passphrase, |
cipher_set_key_string(&ciphercontext, cipher, passphrase, |
CIPHER_DECRYPT); |
CIPHER_DECRYPT); |
cipher_crypt(&ciphercontext, cp, |
cipher_crypt(&ciphercontext, 0, cp, |
buffer_ptr(©), buffer_len(©), 0, 0); |
buffer_ptr(©), buffer_len(©), 0, 0); |
cipher_cleanup(&ciphercontext); |
cipher_cleanup(&ciphercontext); |
memset(&ciphercontext, 0, sizeof(ciphercontext)); |
memset(&ciphercontext, 0, sizeof(ciphercontext)); |