diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-13 13:34:13 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-11-13 13:34:13 +0700 |
commit | 3d4f3a33994cfd31204b392978e964cdde2fb48a (patch) | |
tree | 21ca73763d3dbefcb0e61100e5b70b31601feba2 /crypto/test/src | |
parent | Further refinement to random prime constructor (diff) | |
download | BouncyCastle.NET-ed25519-3d4f3a33994cfd31204b392978e964cdde2fb48a.tar.xz |
Include basic encode/parse test
Diffstat (limited to 'crypto/test/src')
-rw-r--r-- | crypto/test/src/asn1/test/BitStringTest.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/test/src/asn1/test/BitStringTest.cs b/crypto/test/src/asn1/test/BitStringTest.cs index 05be45941..f2ae3de97 100644 --- a/crypto/test/src/asn1/test/BitStringTest.cs +++ b/crypto/test/src/asn1/test/BitStringTest.cs @@ -19,8 +19,12 @@ namespace Org.BouncyCastle.Asn1.Tests // basic construction DerBitString s1 = new DerBitString(new byte[0], 0); + // check GetBytes() s1.GetBytes(); + // check encoding/decoding + DerBitString derBit = (DerBitString)Asn1Object.FromByteArray(s1.GetEncoded()); + if (!Arrays.AreEqual(s1.GetEncoded(), Hex.Decode("030100"))) { Fail("zero encoding wrong"); |