Answer the question
In order to leave comments, you need to log in
How to rewrite code from perl to c#?
hello i have perl code
my $aes = Crypt::AuthEnc::GCM->new ("AES", $key, $iv_bin);
my $plain_text = $aes->decrypt_add ($data);
my $result_tag = $aes->decrypt_done ($tag);
Answer the question
In order to leave comments, you need to log in
Look here:
https://docs.microsoft.com/ru-ru/dotnet/api/system...
It is not clear from your code what is a string and what is bytes, because it is not shown where the key and IV are initialized, but the key and IV are most likely byte.
$plain_text - string
$result_tag, from what I understood from the documentation - you don't need it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question