ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Crypt-Twofish2/Twofish2.xs
(Generate patch)

Comparing Crypt-Twofish2/Twofish2.xs (file contents):
Revision 1.2 by root, Wed Jul 14 15:55:44 2004 UTC vs.
Revision 1.3 by root, Tue Feb 24 09:20:08 2009 UTC

51 if (keysize != 16 && keysize != 24 && keysize != 32) 51 if (keysize != 16 && keysize != 24 && keysize != 32)
52 croak ("wrong key length: key must be 128, 192 or 256 bits long"); 52 croak ("wrong key length: key must be 128, 192 or 256 bits long");
53 if (mode != MODE_ECB && mode != MODE_CBC && mode != MODE_CFB1) 53 if (mode != MODE_ECB && mode != MODE_CBC && mode != MODE_CFB1)
54 croak ("illegal mode: mode must be MODE_ECB, MODE_2 or MODE_CFB1"); 54 croak ("illegal mode: mode must be MODE_ECB, MODE_2 or MODE_CFB1");
55 55
56 Newz(0, RETVAL, 1, struct cryptstate); 56 Newz (0, RETVAL, 1, struct cryptstate); /* Newz required for defined IV */
57 57
58 if (makeKey (&RETVAL->ki, DIR_ENCRYPT, keysize*8, SvPV_nolen(key)) != TRUE) 58 if (makeKey (&RETVAL->ki, DIR_ENCRYPT, keysize*8, SvPV_nolen(key)) != TRUE)
59 croak ("Crypt::Twofish2: makeKey failed, please report!"); 59 croak ("Crypt::Twofish2: makeKey failed, please report!");
60 if (cipherInit (&RETVAL->ci, mode, 0) != TRUE) /* no IV supported (yet) */ 60 if (cipherInit (&RETVAL->ci, mode, 0) != TRUE) /* no IV supported (yet) */
61 croak ("Crypt::Twofish2: makeKey failed, please report!"); 61 croak ("Crypt::Twofish2: makeKey failed, please report!");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines