Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F948996
Blowfish.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
947 B
Subscribers
None
Blowfish.js
View Options
if
(
!
dojo
.
_hasResource
[
"dojox.crypto.tests.Blowfish"
]){
//_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo
.
_hasResource
[
"dojox.crypto.tests.Blowfish"
]
=
true
;
dojo
.
provide
(
"dojox.crypto.tests.Blowfish"
);
dojo
.
require
(
"dojox.crypto.Blowfish"
);
(
function
(){
var
message
=
"The rain in Spain falls mainly on the plain."
;
var
key
=
"foobar"
;
var
base64Encrypted
=
"WI5J5BPPVBuiTniVcl7KlIyNMmCosmKTU6a/ueyQuoUXyC5dERzwwdzfFsiU4vBw"
;
var
dxc
=
dojox
.
crypto
;
tests
.
register
(
"dojox.crypto.tests.Blowfish"
,
[
function
testEncrypt
(
t
){
t
.
assertEqual
(
base64Encrypted
,
dxc
.
Blowfish
.
encrypt
(
message
,
key
));
},
function
testDecrypt
(
t
){
t
.
assertEqual
(
message
,
dxc
.
Blowfish
.
decrypt
(
base64Encrypted
,
key
));
},
function
testShortMessage
(
t
){
var
msg
=
"pass"
;
var
pwd
=
"foobar"
;
var
enc
=
dxc
.
Blowfish
.
encrypt
(
msg
,
pwd
);
var
dec
=
dxc
.
Blowfish
.
decrypt
(
enc
,
pwd
);
t
.
assertEqual
(
dec
,
msg
);
}
]);
})();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 21:06 (2 d, 20 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25061
Default Alt Text
Blowfish.js (947 B)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment