Jose\Algorithm\ContentEncryption\AESCBCHS::decryptContent PHP Method

decryptContent() public method

public decryptContent ( string $data, string $cek, string $iv, string $aad, string $encoded_protected_header, string $tag ) : string
$data string
$cek string
$iv string
$aad string
$encoded_protected_header string
$tag string
return string
    public function decryptContent($data, $cek, $iv, $aad, $encoded_protected_header, $tag)
    {
        Assertion::true($this->isTagValid($data, $cek, $iv, $aad, $encoded_protected_header, $tag), 'Unable to verify the tag.');
        $k = mb_substr($cek, mb_strlen($cek, '8bit') / 2, null, '8bit');
        return openssl_decrypt($data, self::getMode($k), $k, OPENSSL_RAW_DATA, $iv);
    }