Class DERWriter

    • Constructor Detail

      • DERWriter

        public DERWriter()
      • DERWriter

        public DERWriter​(int initialSize)
    • Method Detail

      • startSequence

        public DERWriter startSequence()
      • writeBigInteger

        public void writeBigInteger​(byte... bytes)
                             throws IOException
        The integer is always considered to be positive, so if the first byte is < 0, we pad with a zero to make it positive
        Parameters:
        bytes - BigInteger bytes
        Throws:
        IOException - If failed to write the bytes
      • writeBigInteger

        public void writeBigInteger​(byte[] bytes,
                                    int off,
                                    int len)
                             throws IOException
        The integer is always considered to be positive, so if the first byte is < 0, we pad with a zero to make it positive
        Parameters:
        bytes - BigInteger bytes
        off - Offset in bytes data
        len - Number of bytes to write
        Throws:
        IOException - If failed to write the bytes
      • writeObject

        public void writeObject​(byte tag,
                                int len,
                                byte... data)
                         throws IOException
        Throws:
        IOException