cinegen / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 0 forks source link

DES not working. #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. DES does not work with mode: ECB, CBC or CTR.
2. DES does not work correctly with mode: OFB.

What steps will reproduce the problem?
1.
var crypted = Crypto.DES.encrypt("Message", "Secret Passphrase", { mode: new 
Crypto.mode.CBC }); - not working.
FireBug console: "a._encryptblock is not a function"

2.
var crypted = Crypto.DES.encrypt("Message", "Secret Passphrase");
    crypted = Crypto.util.base64ToBytes(crypted);
    crypted = Crypto.charenc.Binary.bytesToString(crypted);

    // crypted = plaintext = "Message"
    crypted = crypted.substring(8); 

- the same result with PHP function base64decode 

What version of the product are you using? On what operating system?
Chrome, FF+FireBug and 2.5.1

Please provide any additional information below.
btw a better documentation would be nice

Original issue reported on code.google.com by david.bi...@live.de on 2 Nov 2011 at 8:53

GoogleCodeExporter commented 8 years ago
I was able to reproduce and fix the issue. Thanks for discovering that.

Also, point taken on the documentation. I'm working on a new, much improved 
version of this library, complete with full Javadoc-style API documentation.

Original comment by Jeff.Mott.OR on 2 Nov 2011 at 11:43