private function checkKey()
    {
        $keyResource = openssl_get_publickey($this->secretKey);
        $details = openssl_pkey_get_details($keyResource);

        if (!isset($details["key"]) || $details["type"] !== OPENSSL_KEYTYPE_RSA) {
             throw new AppException("Provided Secret Key is invalid");
        }
    }