You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
512 B
16 lines
512 B
define(['doh', '../../crypto/SimpleAES'], function(doh, SimpleAES){ |
|
var message="The rain in Spain falls mainly on the plain."; |
|
var key="foo-bar-baz"; |
|
var enc = null; |
|
|
|
tests.register("dojox.encoding.crypto.tests.SimpleAES", [ |
|
function testAES(t){ |
|
var dt = new Date(); |
|
enc = SimpleAES.encrypt(message, key); |
|
doh.debug("Encrypt: ", new Date()-dt, "ms."); |
|
var dt2 = new Date(); |
|
t.assertEqual(message, SimpleAES.decrypt(enc, key)); |
|
doh.debug("Decrypt: ", new Date()-dt2, "ms."); |
|
} |
|
]); |
|
});
|
|
|