Class Util

java.lang.Object
org.jpos.security.Util

public class Util extends Object
Util class contains some useful methods.
  • Constructor Details

    • Util

      public Util()
  • Method Details

    • adjustDESParity

      public static void adjustDESParity(byte[] bytes)
      DES Keys use the LSB as the odd parity bit. This method can be used enforce correct parity.
      Parameters:
      bytes - the byte array to set the odd parity on.
    • isDESParityAdjusted

      public static boolean isDESParityAdjusted(byte[] bytes)
      DES Keys use the LSB as the odd parity bit. This method checks whether the parity is adjusted or not
      Parameters:
      bytes - the byte[] to be checked
      Returns:
      true if parity is adjusted else returns false