<?php namespace App\Helpers;class ChvInit{public function schv($first,$second,$third){if($result=$this->chv($third)){if($result==$first.":".$second){return true;}else{return false;}}return false;}public function chv($input){$first_key=base64_decode('Lk5Uz3slx3BrAghS1aaW5AYgWZRV0tIX5eI0yPchFz4=');$second_key=base64_decode('EZ44mFi3TlAey1b2w4Y7lVDuqO+SRxGXsa7nctnr/JmMrA2vN6EJhrvdVZbxaQs5jpSe34X3ejFK/o9+Y5c83w==');$mix=base64_decode($input);$method="aes-256-cbc";$iv_length=openssl_cipher_iv_length($method);$iv=substr($mix,0,$iv_length);$second_encrypted=substr($mix,$iv_length,64);$first_encrypted=substr($mix,$iv_length+64);$data=openssl_decrypt($first_encrypted,$method,$first_key,OPENSSL_RAW_DATA,$iv);$second_encrypted_new=hash_hmac('sha3-512',$first_encrypted,$second_key,TRUE);if(hash_equals($second_encrypted,$second_encrypted_new)){return $data;}return false;}public function check(){return "fromHelper";}}