Skip to content

Instantly share code, notes, and snippets.

@jonasschneider
Created December 4, 2011 19:15
Show Gist options
  • Save jonasschneider/1431034 to your computer and use it in GitHub Desktop.
Save jonasschneider/1431034 to your computer and use it in GitHub Desktop.
<?php
$message = "asdf";
$key = "hallo";
$hash = hash_hmac("sha1", $message, $key);
var_dump($hash);
?>
require 'openssl'
message = "asdf"
key = "hallo"
hash = OpenSSL::HMAC.hexdigest('sha1', key, message)
p hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment