File manager - Edit - /var/www/payraty/hris/vendor/iyzico/iyzipay-php/src/Iyzipay/Model/C2CSubMerchantSmsVerificationCodeEncrypter.php
Back
<?php namespace Iyzipay\Model; class C2CSubMerchantSmsVerificationCodeEncrypter { public static function encrypt(C2CSubMerchantApiCredentials $credentials, string $smsVerificationCode): string { $salt = $credentials->getSalt(); $secretKey = $credentials->getSecretKey(); if (is_null($salt) || is_null($secretKey)) { throw new \InvalidArgumentException('Please setup credentials!'); } $data = hash_pbkdf2('sha256', $smsVerificationCode, $salt, 65536, 0, true); $initVector = openssl_random_pseudo_bytes(16, $crypto_strong); $ciphertext = openssl_encrypt($data, 'aes-256-cbc-hmac-sha256', $secretKey, OPENSSL_RAW_DATA, $initVector); return base64_encode($ciphertext); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings