Package org.jpos.security

Examples of org.jpos.security.SecureDESKey


        assertEquals(expected, pvv);
    }

    @Test
    public void testVerifyPVVImpl1() throws Throwable {
        SecureDESKey pvk = tpk; //pvk and zpk are same type
        int pvki = 0;
        String pvv = "1226";
        boolean result = jcesecmod.verifyPVV(pinUnderTPK, tpk, pvk, null, pvki, pvv);
        assertTrue(result);
    }
View Full Code Here


        LogEvent evt = log.createInfo("test_DUKPT " + ksn);
        evt.addMessage(ksn);
        EncryptedPIN pin = new EncryptedPIN(
                pinUnderDukpt, SMAdapter.FORMAT01, pan
        );
        SecureDESKey bdk = (SecureDESKey) ks.getKey(keyName);
        evt.addMessage(pin);
        evt.addMessage(ksn);
        evt.addMessage(bdk);

        EncryptedPIN pinUnderLMK = sm.importPIN(pin, ksn, bdk,tdes);
View Full Code Here

                    short keyLength = (short)Integer.parseInt(commandParams[0]);
                    if (commandName.toUpperCase().compareTo("GC") == 0) {
                        String clearKeyComponenetHexString = sm.generateClearKeyComponent(keyLength);
                    }
                    else if (commandName.toUpperCase().compareTo("FK") == 0) {
                        SecureDESKey KEYunderLMK = sm.formKEYfromThreeClearComponents(keyLength,
                                commandParams[1].toUpperCase(), commandParams[2], commandParams[3], commandParams[4]);
                    }
                    else if (commandName.toUpperCase().compareTo("CK") == 0) {
                        byte[] keyCheckValue = sm.generateKeyCheckValue(
                                new SecureDESKey(keyLength,commandParams[1].toUpperCase(), commandParams[2],""));
                    }
                    else if (commandName.toUpperCase().compareTo("IK") == 0) {
                        SecureDESKey KEKunderLMK = new SecureDESKey((short)Integer.parseInt(commandParams[3]),
                                commandParams[4].toUpperCase(), commandParams[5], commandParams[6]);
                        sm.importKey(keyLength, commandParams[1].toUpperCase(),
                                ISOUtil.hex2byte(commandParams[2]), KEKunderLMK, true);
                    }
                    else if (commandName.toUpperCase().compareTo("KE") == 0) {
                        SecureDESKey KEKunderLMK = new SecureDESKey((short)Integer.parseInt(commandParams[4]),
                                commandParams[5].toUpperCase(), commandParams[6], commandParams[7]);
                        SecureDESKey KEYunderLMK = new SecureDESKey(keyLength, commandParams[1].toUpperCase(),
                                commandParams[2], commandParams[3] );
                        sm.exportKey(KEYunderLMK, KEKunderLMK);
                    }
                    else {
                        System.err.println("Unknown command: " + commandName);
View Full Code Here

TOP

Related Classes of org.jpos.security.SecureDESKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.