Jose\Algorithm\ContentEncryption\AESGCM::encryptContent PHP Метод

encryptContent() публичный Метод

public encryptContent ( $data, $cek, $iv, $aad, $encoded_protected_header, &$tag )
    public function encryptContent($data, $cek, $iv, $aad, $encoded_protected_header, &$tag)
    {
        $calculated_aad = $encoded_protected_header;
        if (null !== $aad) {
            $calculated_aad .= '.' . $aad;
        }
        list($cyphertext, $tag) = GCM::encrypt($cek, $iv, $data, $calculated_aad);
        return $cyphertext;
    }