Sha256: 7ed607746769a7c4b53b1f8ec863c4f2732b1d1fb6ce4d8c8662c0a445952e25

Contents?: true

Size: 1013 Bytes

Versions: 11

Compression:

Stored size: 1013 Bytes

Contents

dojo.provide("dojox.encoding.tests.crypto.Blowfish");
dojo.require("dojox.encoding.crypto.Blowfish");

(function(){
	var message="The rain in Spain falls mainly on the plain.";
	var key="foobar";
	var base64Encrypted="WI5J5BPPVBuiTniVcl7KlIyNMmCosmKTU6a/ueyQuoUXyC5dERzwwdzfFsiU4vBw";
	var dxc=dojox.encoding.crypto;

	tests.register("dojox.encoding.crypto.tests.Blowfish", [
		function testEncrypt(t){
			var dt=new Date();
			t.assertEqual(base64Encrypted, dxc.Blowfish.encrypt(message, key));
			doh.debug("testEncrypt: ", new Date()-dt, "ms.");
		},
		function testDecrypt(t){
			var dt=new Date();
			t.assertEqual(message, dxc.Blowfish.decrypt(base64Encrypted, key));
			doh.debug("testDecrypt: ", new Date()-dt, "ms.");
		},
		function testShortMessage(t){
			var msg="pass";
			var pwd="foobar";
			var dt=new Date();
			var enc=dxc.Blowfish.encrypt(msg, pwd);
			var dec=dxc.Blowfish.decrypt(enc, pwd);
			t.assertEqual(dec, msg);
			doh.debug("testShortMessage: ", new Date()-dt, "ms.");
		}
	]);
})();

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
dojo_src-1.5.0 dojo/dojox/encoding/tests/crypto/Blowfish.js
dojo_src-1.4.3 dojo/dojox/encoding/tests/crypto/Blowfish.js
dojo_src-1.4.102 dojo/dojox/encoding/tests/crypto/Blowfish.js
dojo-pkg-1.132.0 data/dojo-release-1.3.2-src/dojox/encoding/tests/crypto/Blowfish.js
dojo-pkg-1.111.0 data/dojo-release-1.1.1-src/dojox/encoding/tests/crypto/Blowfish.js
dojo-pkg-1.120.0 data/dojo-release-1.2.0-src/dojox/encoding/tests/crypto/Blowfish.js
dojo-pkg-1.121.0 data/dojo-release-1.2.1-src/dojox/encoding/tests/crypto/Blowfish.js
dojo-pkg-1.122.0 data/dojo-release-1.2.2-src/dojox/encoding/tests/crypto/Blowfish.js
dojo-pkg-1.123.0 data/dojo-release-1.2.3-src/dojox/encoding/tests/crypto/Blowfish.js
dojo-pkg-1.130.0 data/dojo-release-1.3.0-src/dojox/encoding/tests/crypto/Blowfish.js
dojo-pkg-1.131.0 data/dojo-release-1.3.1-src/dojox/encoding/tests/crypto/Blowfish.js