title: How to retrieve a signature hash for facebook from a public private key pair?
body: <p>I'm using a version of <a href="https://code.google.com/p/signapk/" rel="nofollow">signapk</a> for one of my projects. I sign my apk with a public, private key pair (.pk8 &amp; .pem). </p>
  
  <p>My application uses the facebook single sign on mechanism and I need a hash of the signing certificate registered with facebook to ensure that the correct app is starting the single sign on process. 
  Facebook gives the following example code for generating this hash: </p>
  
  <pre><code>keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore 
  | openssl sha1 -binary
  | openssl base64
  </code></pre>
  
  <p>I'm a little bit confused on how to generate the appropriate hash from my public key, private key pair that I use for signing. </p>