title: Creating RSA keys from known parameters in Java
body: <p>I'm working on implementing Bing Cashback. In order to verify an incoming request from Bing as valid they provide a signature. The signature is a 160-bit SHA-1 hash of the url encrypted using RSA.</p>
  
  <p>Microsoft provides the RSA "public key", modulus and exponent, with which I'm supposed to decrypt the hash.</p>
  
  <p>Is there a way to create the Java key objects needed to decrypt the hash as Microsoft says? </p>
  
  <p>Everything I can find creates RSA key pairs automatically since that's how RSA is supposed to work. I'd really like to use the Java objects if at all possible since that's obviously more reliable than a hand coded solution.</p>
  
  <p>The example code they've provided is in .NET and uses a .NET library function to verify the hash. Specifically RSACryptoServiceProvider.VerifyHash()</p>