Replies: 1 comment 2 replies
-
|
Здравствуйте. Возможно, вам помогут примеры. Они выполнены в виде модульных тестов; посмотрите по описанию, какой вам подходит лучше. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
using (var publicKey = cert.GetPublicKeyAlgorithm() as Gost_R3410_2012_AsymmetricAlgorithm)
{
// Шифруем данные
byte[] encrypted = publicKey.EncryptData(data);
if (cert.HasPrivateKey)
{
using (var privateKey = cert.GetPrivateKeyAlgorithm() as Gost_R3410_2012_AsymmetricAlgorithm)
{
byte[] decrypted = privateKey.DecryptData(encrypted);
}
}
Но студия выдает ошибку, что не удалось найти тип или имя пространства Gost_R3410_2012_AsymmetricAlgorithm, меняю , теперь пишет, что Gost_R3410_2012_256_AsymmetricAlgorithm не содержит EncryptData, можно пример асимметричного шифрования?
Beta Was this translation helpful? Give feedback.
All reactions