org.jpos.iso.filter
Class MD5Filter

java.lang.Object
  extended by org.jpos.iso.filter.MD5Filter
All Implemented Interfaces:
Configurable, ISOFilter

public class MD5Filter
extends Object
implements ISOFilter, Configurable

Computes an MD5 based Message Authentication Code on outgoing messages and checks that MAC on incoming ones.

Since:
1.2.8
Version:
$Revision$ $Date$
Author:
Alejandro P. Revilla
See Also:
ISOFilter

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jpos.iso.ISOFilter
ISOFilter.VetoException
 
Constructor Summary
MD5Filter()
           
 
Method Summary
 ISOMsg filter(ISOChannel channel, ISOMsg m, LogEvent evt)
           
 int[] getFields(ISOMsg m)
          factory method
protected  byte[] getKey()
          hook for custom key storage (i.e.
 void setConfiguration(Configuration cfg)
           
 void setFields(int[] fields)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD5Filter

public MD5Filter()
Method Detail

setConfiguration

public void setConfiguration(Configuration cfg)
                      throws ConfigurationException
Specified by:
setConfiguration in interface Configurable
Parameters:
cfg -
  • key - initial key
  • fields - Space separated field list
Throws:
ConfigurationException

setFields

public void setFields(int[] fields)

getFields

public int[] getFields(ISOMsg m)
factory method

Parameters:
m - current ISOMsg
Returns:
key fields associated with this ISOMsg

filter

public ISOMsg filter(ISOChannel channel,
                     ISOMsg m,
                     LogEvent evt)
              throws ISOFilter.VetoException
Specified by:
filter in interface ISOFilter
Parameters:
channel - current ISOChannel instance
m - ISOMsg to filter
evt - LogEvent
Returns:
an ISOMsg (possibly parameter m)
Throws:
ISOFilter.VetoException

getKey

protected byte[] getKey()
hook for custom key storage (i.e. crypto cards)



Copyright © 1998-2012 jPOS.org. All Rights Reserved.