Package com.subgraph.orchid.crypto.ASN1Parser

Examples of com.subgraph.orchid.crypto.ASN1Parser.ASN1BitString


    assertEquals(new BigInteger("01020304", 16), asn1Integer.getValue());
  }
 
  @Test
  public void testParseASN1BitString() {
    ASN1BitString bitString = parser.parseASN1BitString(createBuffer("0001020304"));
    assertArrayEquals(new byte[] {1, 2, 3, 4}, bitString.getBytes());
  }
View Full Code Here


  private byte[] asn1ObjectToBitString(ASN1Object ob) {
    if(!(ob instanceof ASN1BitString)) {
      throw new IllegalArgumentException();
    }
    final ASN1BitString bitstring = (ASN1BitString) ob;
    return bitstring.getBytes();
  }
View Full Code Here

TOP

Related Classes of com.subgraph.orchid.crypto.ASN1Parser.ASN1BitString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.