Examples of BitString


Examples of com.turkcelltech.jac.BitString

      for (int i = 0; i < 16; i++) {
          BerNode tmp=new ASN1Boolean(false);
          tmp.setTagClass(Tag.CONTEXT);
          tmp.setTagNumber(3);
          datasetChoice2.addElement(tmp);
          tmp=new BitString(new BitSet(0));
          tmp.setTagClass(Tag.CONTEXT);
          tmp.setTagNumber(4);
          datasetChoice2.addElement(tmp);
      }
//      SequenceOf dataset2=new SequenceOf(datasetChoice2);
View Full Code Here

Examples of erjang.beam.repr.Operands.BitString

      case bs_match_string:
      {
        Label label = readLabel();
        DestinationOperand dest = readDestination();
        BitString bin = readBitstringRef();
        return new Insn.LDBi(opcode, label, dest, bin);
      }

      case bs_put_utf8:
      case bs_put_utf16:
View Full Code Here

Examples of erjang.beam.repr.Operands.BitString

    }

    public BitString readBitstringRef() throws IOException {
    int bits  = readCodeInteger();
    int start = readCodeInteger();
    return new BitString(bitstring(start,bits));
    }
View Full Code Here

Examples of gnu.java.security.der.BitString

    val = der.read();
    if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 1)
      {
        byte[] b = (byte[]) val.getValue();
        issuerUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF);
        logger.log (Component.X509, "read issuerUniqueId == {0}", issuerUniqueId);
        val = der.read();
      }
    if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 2)
      {
        byte[] b = (byte[]) val.getValue();
        subjectUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF);
        logger.log (Component.X509, "read subjectUniqueId == {0}", subjectUniqueId);
        val = der.read();
      }
    if (version >= 3 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 3)
      {
View Full Code Here

Examples of gnu.java.security.der.BitString

    publicKey.add(derN);
    publicKey.add(derE);
    DERValue derPublicKey = new DERValue(DER.CONSTRUCTED | DER.SEQUENCE,
                                         publicKey);
    byte[] spkBytes = derPublicKey.getEncoded();
    DERValue derSPK = new DERValue(DER.BIT_STRING, new BitString(spkBytes));

    ArrayList spki = new ArrayList(2);
    spki.add(derAlgorithmID);
    spki.add(derSPK);
    DERValue derSPKI = new DERValue(DER.CONSTRUCTED | DER.SEQUENCE, spki);
View Full Code Here

Examples of org.apache.directory.api.asn1.util.BitString

   
    @Test
    public void testEncodeBitString()
    {
        BitString bs = new BitString( 10 );
        bs.setBit( 9 );
       
        ByteBuffer buffer = ByteBuffer.allocate( 5 );
       
        try
        {
View Full Code Here

Examples of org.apache.directory.api.asn1.util.BitString

     */
    @Test
    public void testBitStringNull()
    {

        BitString bitString = new BitString( 1 );

        bitString.setData( null );

        try
        {
            bitString.getBit( 0 );
            fail( "Should not reach this point ..." );
        }
        catch ( IndexOutOfBoundsException ioobe )
        {
            assertTrue( true );
View Full Code Here

Examples of org.apache.directory.api.asn1.util.BitString

     */
    @Test
    public void testBitStringEmpty()
    {

        BitString bitString = new BitString( 1 );

        bitString.setData( new byte[]
            {} );

        try
        {
            bitString.getBit( 0 );
            fail( "Should not reach this point ..." );
        }
        catch ( IndexOutOfBoundsException ioobe )
        {
            assertTrue( true );
View Full Code Here

Examples of org.apache.directory.api.asn1.util.BitString

     */
    @Test
    public void testSingleBitBitString() throws DecoderException
    {

        BitString bitString = new BitString( new byte[]
            { 0x07, ( byte ) 0x80 } );

        assertEquals( true, bitString.getBit( 0 ) );
    }
View Full Code Here

Examples of org.apache.directory.api.asn1.util.BitString

     */
    @Test
    public void test32BitsBitString() throws DecoderException
    {

        BitString bitString = new BitString( 32 );

        bitString.setData( new byte[]
            { 0x00, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF } );

        for ( int i = 0; i < 32; i++ )
        {
            assertEquals( true, bitString.getBit( i ) );
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.