From: Thyamad c. <th...@us...> - 2005-09-01 01:07:27
|
Update of /cvsroot/thyapi/thyapi/thyutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10340/thyutils Modified Files: thycrypt.js thydatasource.js thyhash.js thyhashmd5.js Log Message: Commiting file additions and modification from SVN revision 1872 to 1873... Changes made by rpereira on 2005-09-01 03:24:32 +0200 (Thu, 01 Sep 2005) corresponding to SVN revision 1873 with message: - thyCrypt and thyHash tested - thyDataSource link method now searches for populate/sweepOut methods before setting them up Index: thydatasource.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thyutils/thydatasource.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thydatasource.js 29 Aug 2005 04:02:08 -0000 1.3 --- thydatasource.js 1 Sep 2005 01:07:15 -0000 1.4 *************** *** 326,330 **** if (!name && obj.name) name = obj.name; ! if (!event) event = ['read', 'write', 'remove', 'startup']; else if (typeof(event) == 'string') event = [event]; --- 326,335 ---- if (!name && obj.name) name = obj.name; ! if (!event) ! { ! event = ['remove', 'startup']; ! if (typeof(obj.populate) == 'function') event.push('read'); ! if (typeof(obj.sweepOut) == 'function') event.push('write'); ! } else if (typeof(event) == 'string') event = [event]; Index: thyhash.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thyutils/thyhash.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** thyhash.js 23 Aug 2005 13:14:04 -0000 1.1 --- thyhash.js 1 Sep 2005 01:07:15 -0000 1.2 *************** *** 61,65 **** if (window.thyHashMD5) { ! self = new thyHashMD5(); return; } --- 61,66 ---- if (window.thyHashMD5) { ! self.cipher = new thyHashMD5(); ! self.loaded = true; return; } *************** *** 85,94 **** * */ ! p.encode = function (str, key) { ! throw({ ! result:'Cypher not set or encode called before library inclusion. Call on next timeout', ! location: 'thyHash.encode' ! }); } --- 86,100 ---- * */ ! p.encode = function (str) { ! if (!this.cipher) ! { ! throw({ ! result:'Cypher not set or encode called before library inclusion. Call on next timeout', ! location: 'thyHash.encode' ! }); ! } ! ! return this.cipher.encode(str); } Index: thyhashmd5.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thyutils/thyhashmd5.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** thyhashmd5.js 23 Aug 2005 13:14:04 -0000 1.1 --- thyhashmd5.js 1 Sep 2005 01:07:15 -0000 1.2 *************** *** 66,70 **** p.encode = function (str) { ! return this.b64_md5(str); } --- 66,70 ---- p.encode = function (str) { ! return this.hex_md5(str); } Index: thycrypt.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thyutils/thycrypt.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** thycrypt.js 23 Aug 2005 13:14:04 -0000 1.1 --- thycrypt.js 1 Sep 2005 01:07:15 -0000 1.2 *************** *** 63,67 **** if (window.thyBlowfish) { ! self = new thyBlowfish(); return; } --- 63,69 ---- if (window.thyBlowfish) { ! self.cypher = cypher; ! self.cypherObj = new thyBlowfish(); ! self.loaded = true; return; } *************** *** 90,97 **** p.encode = function (str, key) { ! throw({ ! result:'Cypher not set or decode called before library inclusion. Call on next timeout', ! location: 'thyCrypt.encode' ! }); } --- 92,104 ---- p.encode = function (str, key) { ! if (!this.cypherObj) ! { ! throw({ ! result:'Cypher not set or decode called before library inclusion. Call on next timeout', ! location: 'thyCrypt.encode' ! }); ! } ! ! return this.cypherObj.encode(str,key); } *************** *** 106,116 **** * code - The cyphered code * key - The key to be used */ ! p.decode = function (code, key) { ! throw({ ! result:'Cypher not set or decode method called before library inclusion. Call on next timeout', ! location: 'thyCrypt.decode' ! }); } --- 113,129 ---- * code - The cyphered code * key - The key to be used + * init - The initialization vector */ ! p.decode = function (code, key, init) { ! if (!this.cypherObj) ! { ! throw({ ! result:'Cypher not set or decode method called before library inclusion. Call on next timeout', ! location: 'thyCrypt.decode' ! }); ! } ! ! return this.cypherObj.decode(str,key, init); } |