Understanding how to decrypt a download token
<p>I am trying to figure out how to decrypt the download token created in the following post <a href="http://stackoverflow.com/a/4324115/487892">http://stackoverflow.com/a/4324115/487892</a>    </p>

<pre><code>public static string GetDownloadToken(int fileId)
{
    byte[] idbytes = BitConverter.GetBytes(fileId); // 4 bytes 
    byte[] dateTimeBytes = BitConverter.GetBytes(DateTime.Now.ToBinary()); // 8 bytes
    byte[] buffer = new byte[16]; // minimum for an encryption block 
    string password = "password";

    byte[] passwordBytes = Encoding.ASCII.GetBytes(password);
    Array.Copy(idbytes, 0, buffer, 0, idbytes.Length);
    Array.Copy(dateTimeBytes, 0, buffer, idbytes.Length, dateTimeBytes.Length);
    byte[] encryptedBuffer = new byte[256]; 
    using (SHA1CryptoServiceProvider sha1 = new SHA1CryptoServiceProvider())
    {
        int count = sha1.TransformBlock(buffer, 0, buffer.Length, encryptedBuffer, 0);
        return Convert.ToBase64String(encryptedBuffer, 0, count);
    }
}
</code></pre>

<p>My main interest is how do I get the date back so that I can compare it against the current date so that I can expire the token after a period of time? Isn't this doing a 1 way hash? </p>
