Package org.jpos.iso.filter
Class MD5Filter
- java.lang.Object
-
- org.jpos.iso.filter.MD5Filter
-
- All Implemented Interfaces:
Configurable
,ISOFilter
public class MD5Filter extends java.lang.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
- See Also:
ISOFilter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jpos.iso.ISOFilter
ISOFilter.VetoException
-
-
Constructor Summary
Constructors Constructor Description MD5Filter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISOMsg
filter(ISOChannel channel, ISOMsg m, LogEvent evt)
int[]
getFields(ISOMsg m)
factory methodprotected byte[]
getKey()
hook for custom key storage (i.e.void
setConfiguration(Configuration cfg)
void
setFields(int[] fields)
-
-
-
Constructor Detail
-
MD5Filter
public MD5Filter()
-
-
Method Detail
-
setConfiguration
public void setConfiguration(Configuration cfg) throws ConfigurationException
- Specified by:
setConfiguration
in interfaceConfigurable
- 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 interfaceISOFilter
- Parameters:
channel
- current ISOChannel instancem
- ISOMsg to filterevt
- LogEvent- Returns:
- an ISOMsg (possibly parameter m)
- Throws:
ISOFilter.VetoException
-
getKey
protected byte[] getKey()
hook for custom key storage (i.e. crypto cards)
-
-