SuperX-Kernmodul
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.
 
 
 
 
 
 

31 lines
1.0 KiB

/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
/*
dojo.require("dojo.crypto.Rijndael");
function test_Rijndael_encryption(){
var message = "The rain in Spain falls mainly on the plain.";
var key = "foobar";
var base64Encrypted = "QHHcLxph2PC89j0l4XueIvqprjgUaTvCooK31/9fS+SgoLfF1Cns3RD5du5BHF6I";
var result = dojo.crypto.toBase64(dojo.crypto.Rijndael.encrypt(message, key));
jum.assertEquals("RijndaelEncryption", base64Encrypted, result);
}
function test_Rijndael_decryption(){
var message = "The rain in Spain falls mainly on the plain.";
var key = "foobar";
var base64Encrypted = "QHHcLxph2PC89j0l4XueIvqprjgUaTvCooK31/9fS+SgoLfF1Cns3RD5du5BHF6I";
result = dojo.crypto.Rijndael.decrypt(dojo.crypto.fromBase64(base64Encrypted), key);
jum.assertEquals("RijndaelDecryption", message, result);
}
*/