Skip to content

Instantly share code, notes, and snippets.

@BlaM
Forked from julienbourdeau/md5_base64.php
Created October 12, 2016 14:11
Show Gist options
  • Save BlaM/518fd20fa0b77d7f84b2409fcd64c30f to your computer and use it in GitHub Desktop.
Save BlaM/518fd20fa0b77d7f84b2409fcd64c30f to your computer and use it in GitHub Desktop.
PHP: md5_base64 function
function md5_base64( $data ) {
return preg_replace('/=+$/','',base64_encode(pack('H*',md5($data))));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment