<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Config\Constants;


class MyAuth extends Controller
{
   
    public static function Validation($text){
        $pem_key="-----BEGIN PRIVATE KEY-----\n".Constants::Mykey."\n-----END PRIVATE KEY-----";

    $openssl_key = openssl_pkey_get_private($pem_key);
    $padding = OPENSSL_PKCS1_PADDING;
    
     if(openssl_private_decrypt(base64_decode($text), $decryptedText, $openssl_key,$padding)){
         return $decryptedText;
     }else{
       
     }
    }
    
}
