PHP Extension ChaCha20 Encryption

include("chilkat_9_5_0.php");

$crypt = new CkCrypt2();

$crypt->put_CryptAlgorithm('chacha20');
$crypt->put_KeyLength(256);

$crypt->put_EncodingMode('hex');

$ivHex = '000000000000000000000002';
$crypt->SetEncodedIV($ivHex, 'hex');

$crypt->put_InitialCount(42);
$keyHex = '1c9240a5eb55d38af333888604f6b5f0473917c1402b80099dca5cbc207075c0';
$crypt->SetEncodedKey($keyHex, 'hex');

$plainText = ''Twas brillig, and the slithy toves\nDid gyre and gimble in the wabe:\nAll mimsy were the borogoves,\nAnd the mome raths outgrabe.'';

$encStr = $crypt->ecnryptStringENC($plainText);
print $encStr . "\n";

$decStr = $crypt->decryptStringENC($encStr);
print $decStr . "\n";