Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Andrew B

By: a guest on Feb 15th, 2009  |  syntax: PHP  |  size: 0.72 KB  |  hits: 129  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.     $data = "1900847_4aaa6c7038653ad2e4dbeba175a679ba_1234576800";
  3.     $signature = "FkUmueUWrGShv3i+QYPJLFQA5XQeIIXJVFaOzr6lMgHUGCF4dd179atPUKG0FM+JVDF/ole+ZflQo44RU7sSa+NMaFh490ZLbCoz2hNx0c0FTjxKCXWvW9mSuRYOHutfUkIUX1/znwOzm2hqTo20qztO+X751ZaOtcQe6idaz94=";
  4.     $public_key = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfG4IuFO2h/LdDNmonwGNw5srW\nnUEWzoBrPRF1NM8LqpOMD45FAPtZ1NmPtHGo0BAS1UsyJEGXx0NPJ8Gw1z+huLrl\nXnAVX5B4ec6cJfKKmpL/l94WhP2v8F3OGWrnaEX1mLMoxe124Pcfamt0SPCGkeal\nVvXw13PLINE/YptjkQIDAQAB\n-----END PUBLIC KEY-----\n";
  5.     $decoded_signature = base64_decode($signature);
  6.     // prints "1":
  7.      echo openssl_verify($data, $decoded_signature, $public_key, OPENSSL_ALGO_SHA1);
  8. ?>