Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@chrisji
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisji/da33359a92d71e2a78db to your computer and use it in GitHub Desktop.
Save chrisji/da33359a92d71e2a78db to your computer and use it in GitHub Desktop.
natas8
<?php
$encodedSecret = "3d3d516343746d4d6d6c315669563362";
function encodeSecret($secret) {
return bin2hex(strrev(base64_encode($secret)));
}
function decodeSecret($encodedSecret) {
return base64_decode(strrev(hex2bin($encodedSecret)));
}
echo decodeSecret($encodedSecret);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment