document.write('<div class="csharp" style="font-family: monospace;"><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// Generates an SHA type hash of the passed in value and salt.&nbsp; Hash is 88 characters always</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;valueToHash&quot;&gt;The value for hasing&lt;/param&gt;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;salt&quot;&gt;SALT for the hash&lt;/param&gt;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;returns&gt;&lt;/returns&gt;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span>&nbsp; <span style="color: #FF0000;">string</span> SHAHash<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> valueToHash, <span style="color: #FF0000;">string</span> salt<span style="color: #000000;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Security</span>.<span style="color: #0000FF;">Cryptography</span>.<span style="color: #0000FF;">SHA512Managed</span> hasher = <a target="_blank"&nbsp; href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Security</span>.<span style="color: #0000FF;">Cryptography</span>.<span style="color: #0000FF;">SHA512Managed</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF0000;">Byte</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> valueToHashAsByte = <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">Encoding</span>.<span style="color: #0000FF;">UTF8</span>.<span style="color: #0000FF;">GetBytes</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Concat</span><span style="color: #000000;">&#40;</span>valueToHash, salt<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF0000;">Byte</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> returnBytes = hasher.<span style="color: #0000FF;">ComputeHash</span><span style="color: #000000;">&#40;</span>valueToHashAsByte<span style="color: #000000;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hasher.<span style="color: #0000FF;">Clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">return</span> Convert.<span style="color: #0000FF;">ToBase64String</span><span style="color: #000000;">&#40;</span>returnBytes<span style="color: #000000;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />');
document.write('&nbsp;</div>');
document.write('<br />&nbsp;<br /><div style="font-size: 12px">Brought to you by the community at <a href="http://www.bytemycode.com/snippets/snippet/379/1/" target="_blank">byteMyCode</a>.</div>');
