星期二, 九月 04, 2007

Picross DS - FAQ/Puzzle Solutions (ZIP)

 
 

Sent to you by Hudong via Google Reader:

 
 

via IGN Complete on Sep 03, 2007

Picross DS (DS)
Picross DS, Nintendo DS

 
 

Things you can do from here:

 
 

How to digitally sign a string

 
 

Sent to you by Hudong via Google Reader:

 
 

via MSDN Blogs by NicolD on Sep 03, 2007

The first step is to create a pair of key(pulic/private):

RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
string publicKey = RSA.ToXmlString(false);
string privateKey = RSA.ToXmlString(true);
Private key is required to sign the string. Public key is required to verify if the sign is valid or not.

Sequence required to create a sign is:

  • select a private key
  • select an HASH algorithm to create one starting from the string to sign (you'll sign the hash, not the string)
  • create a sign starting from the hash

As shown bellow:

RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
RSA.FromXmlString(privateKey);
RSAPKCS1SignatureFormatter RSAFormatter = new RSAPKCS1SignatureFormatter(RSA);
RSAFormatter.SetHashAlgorithm("SHA1");
SHA1Managed SHhash = new SHA1Managed();
byte[] SignedHashValue = RSAFormatter.CreateSignature( SHhash.ComputeHash(new UnicodeEncoding().GetBytes(stringToBeSigned)));
string signature = System.Convert.ToBase64String(SignedHashValue);
Sequence of operations needed to verify a signature is instead:
  • select the proper public key
  • select the HASH algorithm to create one starting from the string to be verified
  • veirfy the sign

as shown below:

RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
RSA.FromXmlString(publicKey);
RSAPKCS1SignatureDeformatter RSADeformatter = new RSAPKCS1SignatureDeformatter(RSA);
RSADeformatter.SetHashAlgorithm("SHA1");
SHA1Managed SHhash = new SHA1Managed();
if (RSADeformatter.VerifySignature(
SHhash.ComputeHash(new UnicodeEncoding().GetBytes(stringToBeVerified)),
System.Convert.FromBase64String(signature))
)
{
/// The signature is valid.
}
else
{
/// The signature is not valid.
}

 
 

Things you can do from here:

 
 

星期三, 八月 29, 2007

Product Line FeaturesDT Search, $160 per user may be cheap, but it's not as cheap as free lucene.

星期五, 八月 17, 2007

FRYS.com | LEXAR 4GB MSPD $39.99?

星期六, 八月 04, 2007

星期三, 七月 25, 2007

星期日, 七月 15, 2007

星期二, 七月 10, 2007

Qwest Redemptioncontact qwest to get $25 reward card which I should have received.

星期一, 六月 25, 2007

星期日, 六月 17, 2007

YouTube - Broadcast Yourself. zhang rui - mingming

星期五, 六月 01, 2007

Data Validation Overview

Cancel row delete for win form DataGrid/DataTable

星期三, 五月 23, 2007

星期二, 五月 22, 2007

星期一, 五月 14, 2007

星期六, 四月 28, 2007