Privat erkan kaplan Saving as Md5 for later reuse

From NSB App Studio
Revision as of 01:23, 25 May 2013 by Kaplanerkan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Crypto-JS:

https://code.google.com/p/crypto-js/


First, you need to add the crypto-jslibrary into the EXTRAHEADERS:

<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script>


Sample Code:

Dim PassHash 
Function Button1_onclick()

 PassHash = String(CryptoJS.MD5("Erkan kaplan"))
 ' console.log(PassHash.toString(CryptoJS.enc.Latin1)) 
 console.log(PassHash)
 MsgBox PassHash
End Function


Sample code 2:

JavaScript
var MD5_Ident = CryptoJS.MD5('Bonjour'); 
var MD5_Ident1 = CryptoJS.MD5(MD5_Ident); 
var MD5_Ident2 = CryptoJS.MD5('ebc58ab2cb4848d04ec23d83f7ddf985'); 
var MD5_Ident2 = CryptoJS.MD5(CryptoJS.enc.Hex.parse('ebc58ab2cb4848d04ec23d83f7ddf985'));
        
document.writeln('<font color="white">');
document.writeln('<br>MD5_Ident:'+MD5_Ident); 
document.writeln('<br>MD5_Ident1:'+MD5_Ident1);
document.writeln('<br>MD5_Ident2:'+MD5_Ident2);
document.writeln('</font>');
End JavaScript