fdussert / slowaes

Automatically exported from code.google.com/p/slowaes
0 stars 0 forks source link

error in base64 decoding #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

test cases, these should both return the array [97,97]

cryptoHelpers.base64.decode(cryptoHelpers.base64.encode([97,97]))
97,97,64

cryptoHelpers.base64.decode("YWE=")
97,97,64

What do you see instead?
The array: [97,97,64]

What version of the product are you using?
revision 39 from svn, running under Mozilla Rhino

My proposed fix is attached.  After this patch is applied:

js> cryptoHelpers.base64.decode(cryptoHelpers.base64.encode([97,97]))
97,97

js> cryptoHelpers.base64.decode("YWE=")
97,97

Original issue reported on code.google.com by misterb...@gmail.com on 10 Jun 2011 at 10:22

Attachments: