version 1.7, 2003/01/08 22:43:10
|
version 1.10, 2016/02/17 19:15:40
|
Line 1
|
Line 1
|
<script language="JavaScript"> |
<script type="text/javascript" language="JavaScript"> |
|
// <![CDATA[ |
// The LearningOnline Network with CAPA |
// The LearningOnline Network with CAPA |
// Encryption Routines according to Data Encryption Standard DES |
// Encryption Routines according to Data Encryption Standard DES |
// Federal Information Processing Standards Publication 46-2 (1993 Dec 30) |
// Federal Information Processing Standards Publication 46-2 (1993 Dec 30) |
Line 375 function crypted(text) {
|
Line 376 function crypted(text) {
|
return(hexstring(b3)+hexstring(b2)+hexstring(b1)+hexstring(b0)); |
return(hexstring(b3)+hexstring(b2)+hexstring(b1)+hexstring(b0)); |
} |
} |
|
|
|
function getCrypted(text) { |
|
var cryptedtext = ''; |
|
if (text.length > 0) { |
|
var rem = text.length % 15; |
|
var count = Math.floor(text.length/15); |
|
if (rem > 0) { |
|
count ++; |
|
} |
|
for (var i=0; i<count; i++) { |
|
var start = i*15; |
|
cryptedtext += crypted(text.substr(start,15)); |
|
} |
|
} |
|
return cryptedtext; |
|
} |
|
|
|
|
|
// ]]> |
</script> |
</script> |