This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* POLYCRYPT HASH */ | |
function polycryptHash(){ | |
document.getElementById("polypassword").innerHTML=password; | |
var polystring=util.str2abv(password); | |
var op=window.polycrypt.digest("SHA-256",polystring); | |
op.oncomplete=function(e){ | |
var hex=util.abv2hex(e.target.result); | |
document.getElementById("polyhash").innerHTML=hex; | |
} | |
op.onerror=function(e){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsa = RSA.load_pub_key("mykey.pub") | |
ctxt = rsa.public_encrypt(secretstring, RSA.pkcs1_padding) | |
encryptedText = ctxt.encode('base64') | |
print 'Encrypted Text = '+encryptedText | |
priv = RSA.load_key("mykey.pem") | |
decodeEncryptedText = encryptedText.decode('base64') | |
decryptedText = priv.private_decrypt(decodeEncryptedText, RSA.pkcs1_padding) | |
print 'Decrypted Text = '+decryptedText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function public_encrypt($plaintext){ | |
$fp=fopen("./mykey.pub","r"); | |
$pub_key=fread($fp,8192); | |
fclose($fp); | |
openssl_get_publickey($pub_key); | |
openssl_public_encrypt($plaintext,$crypttext, $pub_key ); | |
return(base64_encode($crypttext)); | |
} | |
function private_decrypt($encryptedext){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
md5 = hashlib.md5() | |
md5.update(password+saltstring) | |
print 'MD5 = '+md5.hexdigest() | |
sha1string = hashlib.sha1(password + saltstring) | |
print 'SHA1 = '+sha1string.hexdigest() | |
sha1string = hashlib.sha512(password + saltstring) | |
print 'SHA512 = '+sha1string.hexdigest() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$md5 = md5($password.$salt); | |
echo "MD5 = $md5<br />"; | |
$sha1 = sha1($password.$salt); | |
echo "SHA1 = $sha1<br />"; | |
$sha512 = hash('sha512', $password.$salt); | |
echo "SHA512 = $sha512<br />"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="centralTemplate" type="text/x-handlebars-template"> | |
<div class="central">{{contentSent}}</div> | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#unless contentSent.license}} | |
<h3>WARNING: license not set</h3> | |
{{/unless}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#if contentSent.author}} | |
<p>{{contentSent.author.firstName}} {{contentSent.author.lastName}}</p> | |
{{else}} | |
<p>Unknown Author</p> | |
{{/if}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#each contentSent.people}} | |
<li>{{@index}} - {{this}}</li> | |
{{else}} | |
<li>No people to list</li> | |
{{/each}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#with contentSent.author}} | |
<p>By {{firstName}} {{lastName}}</p> | |
{{/with}} |