de.flexiprovider.core.md
Class VSH.Bitstring

java.lang.Object
  |
  +--de.flexiprovider.core.md.VSH.Bitstring
Enclosing class:
VSH

protected static class VSH.Bitstring
extends java.lang.Object

Inner class for representing bit strings.


Constructor Summary
VSH.Bitstring(int length, byte[] os)
          Creates a new Bitstring by converting the given byte[] os according to 1363 and using the given length.
VSH.Bitstring(int length, FlexiBigInt bi)
          Construct a new bit string by converting the given FlexiBigInt bi according to 1363 and using the given length.
 
Method Summary
 int getBit(int i)
          Get the bit at the specified position.
 void reduceN()
          Reduces this.len by finding the most significant bit set to one and reducing len and blocks.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VSH.Bitstring

public VSH.Bitstring(int length,
                     byte[] os)
Creates a new Bitstring by converting the given byte[] os according to 1363 and using the given length.
Parameters:
length - the length
os - the octet string to assign to this bitstring
See Also:
"P1363 5.5.2 p22f, OS2BSP"

VSH.Bitstring

public VSH.Bitstring(int length,
                     FlexiBigInt bi)
Construct a new bit string by converting the given FlexiBigInt bi according to 1363 and using the given length.
Parameters:
length - the length of this bit string
bi - the FlexiBigInt to assign to this bit string
See Also:
"P1363 5.5.1 p22, I2BSP"
Method Detail

reduceN

public void reduceN()
Reduces this.len by finding the most significant bit set to one and reducing len and blocks.

getBit

public int getBit(int i)
Get the bit at the specified position.
Parameters:
i - the bit position
Returns:
the bit at the specified position