private function encryptPayLoadBasedOnToken($payLoad, $hashAlgorithm = null)
    {
        if ($hashAlgorithm == null) {
            $hashAlgorithm = TokenVerifier::HASH_ALGORITHM;
        }
        $hashedPayLoad = hash_hmac($hashAlgorithm, $payLoad, $this->verifierToken);
        $encodedHashedPayLoad = base64_encode(hex2bin($hashedPayLoad));
        return $encodedHashedPayLoad;
    }
private function encryptPayLoadBasedOnToken($payLoad, $hashAlgorithm = null)
    {
        if ($hashAlgorithm == null) {
            $hashAlgorithm = TokenVerifier::HASH_ALGORITHM;
        }
        $hashedPayLoad = hash_hmac($hashAlgorithm, $payLoad, $this->verifierToken);
        $encodedHashedPayLoad = base64_encode(hex2bin($hashedPayLoad));
        return $encodedHashedPayLoad;
    }
private function encryptPayLoadBasedOnToken ( $ payLoad , $ hashAlgorithm = null ) { if ( $ hashAlgorithm == null ) { $ hashAlgorithm = TokenVerifier :: HASH_ALGORITHM ; } $ hashedPayLoad = hash_hmac ( $ hashAlgorithm , $ payLoad , $ this -> verifierToken ) ; $ encodedHashedPayLoad = base64_encode ( hex2bin ( $ hashedPayLoad ) ) ; return $ encodedHashedPayLoad ; }
Encrypt the payload based on hash algorithm and verifier Token

@param $payLoad
@param null $hashAlgorithm
@return string
Encrypt the payload based on hash algorithm and verifier Token