SHARE
TWEET

Untitled

a guest May 24th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function generateRequestKey(){
  2.         $key = md5(base64_encode(random_bytes(10)));
  3.  
  4.         if($this->entityManager->getRepository(Request::class)->findOneBy(['request_key' => $key])){
  5.             $this->generateRequestKey();
  6.         }
  7.  
  8.         return $key;
  9.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top