--- loncom/auth/londes.js 2009/05/22 17:01:28 1.9 +++ loncom/auth/londes.js 2016/02/17 19:15:40 1.10 @@ -4,7 +4,7 @@ // Encryption Routines according to Data Encryption Standard DES // Federal Information Processing Standards Publication 46-2 (1993 Dec 30) // -// $Id: londes.js,v 1.9 2009/05/22 17:01:28 bisitz Exp $ +// $Id: londes.js,v 1.10 2016/02/17 19:15:40 raeburn Exp $ // // Copyright Michigan State University Board of Trustees // @@ -376,5 +376,22 @@ function crypted(text) { 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