baboleevan / crypto-js Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/crypto-js
Automatically exported from code.google.com/p/crypto-js
What steps will reproduce the problem?
1. Replace YUI Compressor with Google Closure compiler
2. See build fail
The following cause errors and/or warnings:
in CBC.js:
while (c.pop() != 0x80) ;
The compiler wants {} instead of ;
in AES.js (twice):
mode = options && options.mode || C.mode.OFB;
The variable mode is not declared. Prepending "var " to the lines solves this.
Original issue reported on code.google.com by [email protected]
on 5 Mar 2011 at 1:07
What steps will reproduce the problem?
Use the latest Chrome dev (6.0.495.0)
Call:
Crypto.util.bytesToBase64(Crypto.HMAC(Crypto.SHA1, "GA", "GA", {asBytes: true}))
What is the expected output? What do you see instead?
Expected: bBg1Ebw0ajGh8E47JCjrZ63PdKI=
Instead I see: o4iKvmV1Ahll2gbgpSLys/9e5pY=
What version of the product are you using? On what operating system?
Chrome (6.0.495.0) on OSX
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Aug 2010 at 1:44
What steps will reproduce the problem?
1. run Crypto.SHA256("á") in firebug
What is the expected output?
fb9778719d93551b1c88df5f1ab229f83ea30af112fc51017c9f0a383dcf6cb3
What do you see instead?
eb3e85d7fbf56104c8021681e68d771b9b9205b93e9219c8f81f60af703de381
What version of the product are you using?
2.0.0
On what operating system?
Mac/Chrome 7
Original issue reported on code.google.com by [email protected]
on 17 Nov 2010 at 3:25
We are trying to decrypt existing AES crypto that uses the CBC mode. The
problem is that the upper layers always make sure that the plain text is of
correct length, and thus no padding mechanism is needed from the encryption
library. crypto-js however, assumes in CBC mode that the data has been padded
in a specific way.
We are trying to write a library that is compatible with a piece of existing
software, so we cannot change that software to add a crypto-js compatible
padding. Also the other way around, while encrypting the data, the padding
added by crypto-js CBC code might break the original application while it tries
to decrypt items created by crypto-js.
We were able to work around this by making our own copy of the cbc mode and
commenting out the padding related code. However we are hoping the library
would gain an option for disabling the padding.
Original issue reported on code.google.com by [email protected]
on 18 Jun 2010 at 9:06
What steps will reproduce the problem?
1. Start the Testsuite on Opera 10.53
What is the expected output? What do you see instead?
All tests should pass but these are failing
test util.gt: failed.
Value should be true.
Expected: true (boolean)
Actual: false (boolean)
test util.lt: failed.
Value should be true.
Expected: true (boolean)
Actual: false (boolean)
test util.endian: failed.
Values should be equal.
Expected: 4041261184 (number)
Actual: -253706112 (number)
test enc.UTF8.decode: failed.
Values should be equal.
Expected: 1105365410,3465620992 (string)
Actual: 1105365410,-829346304 (string)
test enc.Base64.decode: failed.
Values should be equal.
Expected: 352033795,3648913408 (string)
Actual: 352033795,-646053888 (object)
test types.WordArray.concat: failed.
Values should be equal.
Expected: 4294967295 (string)
Actual: -1 (string)
test SHA256: failed.
Values should be equal.
Expected: f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650
(string)
Actual: 8a19c396a89853b8baf0050e3b4dfeb4f19bae586f6b491249a1fe38ff98faa5
(string)
Opera
Version 10.53
Build 3374
Platform Win32
Original issue reported on code.google.com by [email protected]
on 5 Jun 2010 at 2:07
Currently it seems that symmetric ciphers like AES can work with CBC mode but
only using random iv.
Could you add ability to provide iv along with mode in options to AES?
Original issue reported on code.google.com by [email protected]
on 5 Jul 2010 at 11:59
While using crypto-js we have experienced some problems in converting a byte
string into a list of integers. We occasionally get values bigger than 0xff.
Which obviously should not happen when converting a bytestring into integers.
We were able to fix the problem by doing a bitwise AND against 0xff before
outputting the value (see code below). This seemed to fix the issue for us. We
feel this might be a bug in the library. In case we got it wrong, we'd like to
gain better understanding about what is happening.
Crypto.charenc.Binary.stringToBytes = function (str) {
for (var bytes = [], i = 0; i < str.length; i++) {
bytes.push(str.charCodeAt(i) & 0xff);
}
return bytes;
};
Original issue reported on code.google.com by [email protected]
on 18 Jun 2010 at 8:57
Problem: Browsers will stop and display a warning when crypto operations takes
too long to run (like PBKDF2 with large iteration). Means of detection browsers
use varies, some measure actual time, others measuring # of statements.
Suggested solution: divide up crypto operations into smaller units and run each
unit through a callback argument. With browsers, callback can be implemented
using setTimeout or Web worker API. With Node.js, callback can call
process.nextTick.
Original issue reported on code.google.com by [email protected]
on 7 Mar 2011 at 12:34
What steps will reproduce the problem?
1. in an HTML file, include scripts/crypto-md5/crypto-md5.js (from the
latest downloadable zip file)
2. also include scripts/crypto-sha1/crypto-sha1.js
3. the Crypto.MD5 function will not be available (you get an error if you
try to use it)
4. remove scripts/crypto-sha1/crypto-sha1.js
5. the Crypto.MD5 function is now available
What is the expected output? What do you see instead?
I expect to be able to use both the Crypto.MD5 and Crypto.SHA1 (and
Crypto.SHA256) in the same page.
What version of the product are you using? On what operating system?
crypto-js 2.0.0
OS is Linux (Ubuntu 9.10)
Browser = Firefox 3.5.8
Please provide any additional information below.
It seems crypto-sha1.js overwrites the Crypto object, thus removing the
Crypto.MD5 function
This is probably true for all the Crypto.* methods
Original issue reported on code.google.com by [email protected]
on 9 Apr 2010 at 4:43
What steps will reproduce the problem?
1. Call Crypto.MD5() with a string larger than 4000 characters
What is the expected output? What do you see instead?
The returned MD5 hash string is the correct length, however every character
is a zero.
What version of the product are you using? On what operating system?
Crypto-JS v1.1.0, Firefox 3.5, Windows XP Pro
Original issue reported on code.google.com by [email protected]
on 16 Sep 2009 at 4:04
What steps will reproduce the problem?
1. compute has using Crypto.HMAC(Crypto.SHA1, "Message", "Key", { asBytes: true
}); in IE
2. Repeat step (1) in Safari
3. Compare array of bytes
What is the expected output? What do you see instead?
Output should be the same, but they're different.
What version of the product are you using? On what operating system?
Windows Vista Home Edition, IE 8, Safari 5
Original issue reported on code.google.com by [email protected]
on 12 Nov 2010 at 5:02
I needed compatibility with node.js crypto, so I had to hack AES.js to pass IV
in. At the same time, IV had to be packaged separately and not part of the
encrypted result.
My modified version of AES.js is attached for your review.
Note that options.iv is assumed to be an array in my version.
Thx.
Original issue reported on code.google.com by [email protected]
on 14 Mar 2011 at 9:24
Attachments:
When using the HMAC SHA1 functions, the functions do not return the same
data as provided by the RFC2202 (http://www.faqs.org/rfcs/rfc2202.html).
Original issue reported on code.google.com by [email protected]
on 15 Mar 2010 at 2:09
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.