daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Dec 11th, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $request = '{data};
  2. $IVdata = random_bytes(16);
  3. $pw = random_bytes(32);
  4. $mk = 'xxx'; // hmac контроль в формате base64
  5. $dataAES = openssl_encrypt($request, "aes-256-ctr", $pw, OPENSSL_RAW_DATA, $IVdata);
  6. $hmac = hash_hmac('sha512', $IVdata.$dataAES, base64_decode($mk), true);
  7. $returnDataDE = base64_encode($hmac.$IVdata.$dataAES);
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