title: How do you verify an RSA SHA1 signature in Python?
body: <p>I've got a string, a signature, and a public key, and I want to verify the signature on the string. The key looks like this:</p>
  
  <pre><code>-----BEGIN PUBLIC KEY-----
  MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfG4IuFO2h/LdDNmonwGNw5srW
  nUEWzoBrPRF1NM8LqpOMD45FAPtZ1NmPtHGo0BAS1UsyJEGXx0NPJ8Gw1z+huLrl
  XnAVX5B4ec6cJfKKmpL/l94WhP2v8F3OGWrnaEX1mLMoxe124Pcfamt0SPCGkeal
  VvXw13PLINE/YptjkQIDAQAB
  -----END PUBLIC KEY-----
  </code></pre>
  
  <p>I've been reading the pycrypto docs for a while, but I can't figure out how to make an RSAobj with this kind of key. If you know PHP, I'm trying to do the following:</p>
  
  <pre><code>openssl_verify($data, $signature, $public_key, OPENSSL_ALGO_SHA1);
  </code></pre>
  
  <p>Also, if I'm confused about any terminology, please let me know.</p>