Class ByteArrayTagOrder

java.lang.Object
org.mozilla.jss.netscape.security.util.ByteArrayTagOrder
All Implemented Interfaces:
Serializable, Comparator<byte[]>

public class ByteArrayTagOrder extends Object implements Comparator<byte[]>, Serializable
See Also:
  • Field Details

  • Constructor Details

    • ByteArrayTagOrder

      public ByteArrayTagOrder()
  • Method Details

    • compare

      public final int compare(byte[] bytes1, byte[] bytes2)
      Compare two byte arrays, by the order of their tags, as defined in ITU-T X.680, sec. 6.4. (First compare tag classes, then tag numbers, ignoring the constructivity bit.)
      Specified by:
      compare in interface Comparator<byte[]>
      Parameters:
      bytes1 - first byte array to compare.
      bytes2 - second byte array to compare.
      Returns:
      negative number if bytes1 < bytes2, 0 if bytes1 == bytes2, positive number if bytes1 > bytes2.