diff options
author | David Hook <dgh@cryptoworkshop.com> | 2020-04-25 13:11:33 +1000 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2020-04-25 13:11:33 +1000 |
commit | fac7ac9bfe82e7c4eedf5a7b26bed58e49fa988b (patch) | |
tree | 229da03984ecbf55afbd25707ccee29e2523557b /crypto/test | |
parent | fixed typo (diff) | |
download | BouncyCastle.NET-ed25519-fac7ac9bfe82e7c4eedf5a7b26bed58e49fa988b.tar.xz |
github #237 - gost 2012 parsing
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/src/security/test/TestEncodings.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/test/src/security/test/TestEncodings.cs b/crypto/test/src/security/test/TestEncodings.cs index a70d5b5b7..91e1375dd 100644 --- a/crypto/test/src/security/test/TestEncodings.cs +++ b/crypto/test/src/security/test/TestEncodings.cs @@ -179,5 +179,18 @@ namespace Org.BouncyCastle.Security.Tests Assert.IsTrue(true, "DSATest worked."); } + + [Test] + public void TestGost2012() + { + byte[] data = Base64.Decode( + "MIGiAgEAMCEGCCqFAwcBAQECMBUGCSqFAwcBAgECAQYIKoUDBwEBAgMEQIXnWrZ6" + + "ajvbCU6x9jK49PgQqCP00T/lW3laXCXueMF8X4Q1y3N9zfOJT2s/IgyPJVrUhgtO" + + "1Akp+Roh8bCPPlqgODA2BggqhQMCCQMIATEqBCi72ZvrBVW6mFL/bQeXeMTf8Jh8" + + "p/diI7Cg8ig4mXg3tsIUf4vBi61b"); + + var keyInfo = PrivateKeyInfo.GetInstance(data); + var akp = Org.BouncyCastle.Security.PrivateKeyFactory.CreateKey(keyInfo); + } } } |