|
jPOS 1.6.7 API Documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpos.security.BaseSMAdapter
org.jpos.security.jceadapter.JCESecurityModule
public class JCESecurityModule
JCESecurityModule is an implementation of a security module in software.
It doesn't require any hardware device to work.
JCESecurityModule also implements the SMAdapter, so you can view it: either
as a self contained security module adapter that doesn't need a security module
or a security module that plugs directly to jpos, so doesn't need
a separate adapter.
It relies on Java(tm) Cryptography Extension (JCE), hence its name.
JCESecurityModule relies on the JCEHandler class to do the low level JCE work.
WARNING: This version of JCESecurityModule is meant for testing purposes and NOT for life operation, since the Local Master Keys are stored in CLEAR on the system's disk. Comming versions of JCESecurity Module will rely on java.security.KeyStore for a better protection of the Local Master Keys.
| Field Summary |
|---|
| Fields inherited from interface org.jpos.security.SMAdapter |
|---|
FORMAT00, FORMAT01, FORMAT02, FORMAT03, FORMAT04, FORMAT05, LENGTH_DES, LENGTH_DES3_2KEY, LENGTH_DES3_3KEY, TYPE_BDK, TYPE_CVK, TYPE_PVK, TYPE_TAK, TYPE_TMK, TYPE_TPK, TYPE_ZAK, TYPE_ZMK, TYPE_ZPK |
| Constructor Summary | |
|---|---|
JCESecurityModule()
Creates an uninitialized JCE Security Module, you need to setConfiguration to initialize it |
|
JCESecurityModule(Configuration cfg,
Logger logger,
java.lang.String realm)
|
|
JCESecurityModule(java.lang.String lmkFile)
|
|
JCESecurityModule(java.lang.String lmkFile,
java.lang.String jceProviderClassName)
|
|
| Method Summary | |
|---|---|
java.lang.String |
decryptPINImpl(EncryptedPIN pinUnderLmk)
Your SMAdapter should override this method if it has this functionality |
EncryptedPIN |
encryptPINImpl(java.lang.String pin,
java.lang.String accountNumber)
Your SMAdapter should override this method if it has this functionality |
byte[] |
exportKeyImpl(SecureDESKey key,
SecureDESKey kek)
Your SMAdapter should override this method if it has this functionality |
EncryptedPIN |
exportPINImpl(EncryptedPIN pinUnderLmk,
SecureDESKey kd2,
byte destinationPINBlockFormat)
Your SMAdapter should override this method if it has this functionality |
SecureDESKey |
generateKeyImpl(short keyLength,
java.lang.String keyType)
Your SMAdapter should override this method if it has this functionality |
SecureDESKey |
importKeyImpl(short keyLength,
java.lang.String keyType,
byte[] encryptedKey,
SecureDESKey kek,
boolean checkParity)
Your SMAdapter should override this method if it has this functionality |
EncryptedPIN |
importPINImpl(EncryptedPIN pinUnderKd1,
SecureDESKey kd1)
Your SMAdapter should override this method if it has this functionality |
void |
setConfiguration(Configuration cfg)
Configures a JCESecurityModule |
EncryptedPIN |
translatePINImpl(EncryptedPIN pinUnderKd1,
SecureDESKey kd1,
SecureDESKey kd2,
byte destinationPINBlockFormat)
Your SMAdapter should override this method if it has this functionality |
| Methods inherited from class org.jpos.security.BaseSMAdapter |
|---|
decryptPIN, encryptPIN, eraseOldLMK, eraseOldLMKImpl, exportKey, exportPIN, generateCBC_MAC, generateEDE_MAC, generateKey, generateKeyCheckValue, getLogger, getName, getRealm, getSMAdapter, importKey, importPIN, importPIN, setLogger, setName, translateKeyFromOldLMK, translateKeyFromOldLMKImpl, translatePIN, translatePIN |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JCESecurityModule()
public JCESecurityModule(java.lang.String lmkFile)
throws SMException
lmkFile - Local Master Keys filename of the JCE Security Module
SMException
public JCESecurityModule(java.lang.String lmkFile,
java.lang.String jceProviderClassName)
throws SMException
SMException
public JCESecurityModule(Configuration cfg,
Logger logger,
java.lang.String realm)
throws ConfigurationException
ConfigurationException| Method Detail |
|---|
public void setConfiguration(Configuration cfg)
throws ConfigurationException
setConfiguration in interface ConfigurablesetConfiguration in class BaseSMAdaptercfg - The following properties are read:ConfigurationException
public SecureDESKey generateKeyImpl(short keyLength,
java.lang.String keyType)
throws SMException
BaseSMAdapter
SMException
public SecureDESKey importKeyImpl(short keyLength,
java.lang.String keyType,
byte[] encryptedKey,
SecureDESKey kek,
boolean checkParity)
throws SMException
BaseSMAdapter
SMException
public byte[] exportKeyImpl(SecureDESKey key,
SecureDESKey kek)
throws SMException
BaseSMAdapter
SMException
public EncryptedPIN encryptPINImpl(java.lang.String pin,
java.lang.String accountNumber)
throws SMException
BaseSMAdapter
SMException
public java.lang.String decryptPINImpl(EncryptedPIN pinUnderLmk)
throws SMException
BaseSMAdapter
SMException
public EncryptedPIN importPINImpl(EncryptedPIN pinUnderKd1,
SecureDESKey kd1)
throws SMException
BaseSMAdapter
SMException
public EncryptedPIN exportPINImpl(EncryptedPIN pinUnderLmk,
SecureDESKey kd2,
byte destinationPINBlockFormat)
throws SMException
BaseSMAdapter
SMException
public EncryptedPIN translatePINImpl(EncryptedPIN pinUnderKd1,
SecureDESKey kd1,
SecureDESKey kd2,
byte destinationPINBlockFormat)
throws SMException
BaseSMAdapter
SMException
|
jPOS.org | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||