Class DerEncoder


  • public class DerEncoder
    extends java.lang.Object
    Utilities for re-encoding a signature byte array with DER encoding.

    Note: that this is not a general purpose encoder and currently only handles 512 bit signatures. ES256 verification algorithms expect the signature bytes in DER encoding.

    • Constructor Summary

      Constructors 
      Constructor Description
      DerEncoder()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static byte[] encode​(byte[] signature)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DER_TAG_SIGNATURE_OBJECT

        private static byte DER_TAG_SIGNATURE_OBJECT
      • DER_TAG_ASN1_INTEGER

        private static byte DER_TAG_ASN1_INTEGER
    • Constructor Detail

      • DerEncoder

        public DerEncoder()
    • Method Detail

      • encode

        static byte[] encode​(byte[] signature)