Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Unified Diff: benchmarks/crypto.js

Issue 4401: Introduce some checks to indicate that the benchmarks have run correctly.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « benchmarks/base.js ('k') | benchmarks/earley-boyer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: benchmarks/crypto.js
===================================================================
--- benchmarks/crypto.js (revision 362)
+++ benchmarks/crypto.js (working copy)
@@ -1674,16 +1674,23 @@
setupEngine(am3, 28);
-var RSA = new RSAKey();
-var TEXT = "The quick brown fox jumped over the extremely lazy frogs!";
+var TEXT = "The quick brown fox jumped over the extremely lazy frog! " +
+ "Now is the time for all good men to come to the party.";
+var encrypted;
-RSA.setPublic(nValue, eValue);
-RSA.setPrivateEx(nValue, eValue, dValue, pValue, qValue, dmp1Value, dmq1Value, coeffValue);
-
function encrypt() {
- return RSA.encrypt(TEXT);
+ var RSA = new RSAKey();
+ RSA.setPublic(nValue, eValue);
+ RSA.setPrivateEx(nValue, eValue, dValue, pValue, qValue, dmp1Value, dmq1Value, coeffValue);
+ encrypted = RSA.encrypt(TEXT);
}
function decrypt() {
- return RSA.decrypt(TEXT);
+ var RSA = new RSAKey();
+ RSA.setPublic(nValue, eValue);
+ RSA.setPrivateEx(nValue, eValue, dValue, pValue, qValue, dmp1Value, dmq1Value, coeffValue);
+ var decrypted = RSA.decrypt(encrypted);
+ if (decrypted != TEXT) {
+ throw new Error("Crypto operation failed");
+ }
}
« no previous file with comments | « benchmarks/base.js ('k') | benchmarks/earley-boyer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698