version 1.1, 2000/06/28 22:49:24
|
version 1.9, 2009/05/22 17:01:28
|
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) |
|
// |
|
// $Id$ |
|
// |
|
// Copyright Michigan State University Board of Trustees |
|
// |
|
// This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
|
// |
|
// LON-CAPA is free software; you can redistribute it and/or modify |
|
// it under the terms of the GNU General Public License as published by |
|
// the Free Software Foundation; either version 2 of the License, or |
|
// (at your option) any later version. |
|
// |
|
// LON-CAPA is distributed in the hope that it will be useful, |
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
// GNU General Public License for more details. |
|
// |
|
// You should have received a copy of the GNU General Public License |
|
// along with LON-CAPA; if not, write to the Free Software |
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
// |
|
// /home/httpd/html/adm/gpl.txt |
|
// |
|
// http://www.lon-capa.org/ |
|
// |
// JavaScript Implementation by Gerd Kortemeyer |
// JavaScript Implementation by Gerd Kortemeyer |
// 1997,06/27/00,06/28 Gerd Kortemeyer |
// 1997,06/27/00,06/28 Gerd Kortemeyer |
|
|
Line 129 function shift(sreg) {
|
Line 155 function shift(sreg) {
|
// Initialize key-arrays according to uextkey and lextkey |
// Initialize key-arrays according to uextkey and lextkey |
|
|
function initkeys() { |
function initkeys() { |
|
init(); |
// Constants |
// Constants |
var celements="574941332517 9 158504234261810 259514335271911 360524436"; |
var celements="574941332517 9 158504234261810 259514335271911 360524436"; |
var delements="63554739312315 762544638302214 661534537292113 5282012 4"; |
var delements="63554739312315 762544638302214 661534537292113 5282012 4"; |
Line 349 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)); |
} |
} |
|
|
|
// ]]> |
</script> |
</script> |