jPOS 1.6.1 API Documentation

org.jpos.security
Class Util

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

public class Util
extends java.lang.Object

Util class contains some useful methods.

Version:
$Revision: 2594 $ $Date: 2008-01-22 08:41:31 -0800 (Tue, 22 Jan 2008) $
Author:
Hani S. Kirollos

Constructor Summary
Util()
           
 
Method Summary
static void adjustDESParity(byte[] bytes)
          DES Keys use the LSB as the odd parity bit.
static boolean isDESParityAdjusted(byte[] bytes)
          DES Keys use the LSB as the odd parity bit.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

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

jPOS.org