Skip to content

Instantly share code, notes, and snippets.

@saltun
Created May 17, 2019 12:44
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 saltun/cd9025fce14fbfec82026eafc5fec345 to your computer and use it in GitHub Desktop.
Save saltun/cd9025fce14fbfec82026eafc5fec345 to your computer and use it in GitHub Desktop.
PHP Strong unique api key generator
<?php
echo bin2hex(random_bytes(20)); // int type
// return 4b5ffb1b86049479d7bc875bcaf0a9b4fcfd1b16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment