Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
privatekeycipher.php
1<?php
9
14{
18 protected function doEncrypt($data, $key)
19 {
20 $success = openssl_private_encrypt($data, $out, $key);
21
22 return $success ? $out : false;
23 }
24
28 protected function doDecrypt($data, $key)
29 {
30 $success = openssl_private_decrypt($data, $out, $key);
31
32 return $success ? $out : false;
33 }
34
38 protected function getKeyInfo($key)
39 {
40 return openssl_pkey_get_details(openssl_get_privatekey($key));
41 }
42}