cvs: php3 /functions mcrypt.c
| From: | Andrew Skalski | Date: | Fri, 01 Sep 2000 20:14:49 +0000 |
| Subject: | cvs: php3 /functions mcrypt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1494@lists.php.net to get a copy of this message | ||
askalski Fri Sep 1 13:14:49 2000 EDT
Modified files:
/php3/functions mcrypt.c
Log:
changed "mcrypt_cbc" to use init_mcrypt_cbc_iv() when an IV is given
Index: php3/functions/mcrypt.c
diff -u php3/functions/mcrypt.c:1.20 php3/functions/mcrypt.c:1.21
--- php3/functions/mcrypt.c:1.20 Mon Jul 10 03:15:36 2000
+++ php3/functions/mcrypt.c Fri Sep 1 13:14:49 2000
@@ -341,16 +341,19 @@
}
MCRYPT_CONVERT;
MCRYPT_SIZE;
- if(ac > 4) {
+
+ if (ac > 4) {
MCRYPT_CHECK_IV;
+ td = init_mcrypt_cbc_iv(
+ cipher->value.lval, key->value.str.val,
+ key->value.str.len, iv->value.str.val);
}
-
- td = init_mcrypt_cbc(cipher->value.lval, key->value.str.val, key->value.str.len);
- MCRYPT_CHECK_TD_CPY;
-
- if(ac > 4) {
- mcrypt(td, iv->value.str.val);
+ else {
+ td = init_mcrypt_cbc(
+ cipher->value.lval, key->value.str.val,
+ key->value.str.len);
}
+ MCRYPT_CHECK_TD_CPY;
MCRYPT_ACTION(cbc);