Examples of SimpleMsg


Examples of org.jpos.util.SimpleMsg

    @Override
    public boolean verifyIBMPINOffset(EncryptedPIN pinUnderKd1, SecureDESKey kd1, SecureDESKey pvk,
                                      String offset, String decTab, String pinValData,
                                      int minPinLen) throws SMException {
      SimpleMsg[] cmdParameters = {
        new SimpleMsg("parameter", "account number", pinUnderKd1.getAccountNumber()),
        new SimpleMsg("parameter", "PIN under Data Key 1", pinUnderKd1),
        new SimpleMsg("parameter", "Data Key 1", kd1),
        new SimpleMsg("parameter", "PVK", pvk),
        new SimpleMsg("parameter", "Pin block format", pinUnderKd1.getPINBlockFormat()),
        new SimpleMsg("parameter", "decimalisation table", decTab),
        new SimpleMsg("parameter", "PIN validation data", pinValData),
        new SimpleMsg("parameter", "minimum PIN length", minPinLen),
        new SimpleMsg("parameter", "offset", offset)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Verify PIN offset", cmdParameters));

      try {
        boolean r = verifyIBMPINOffsetImpl(pinUnderKd1, kd1, pvk, offset, decTab,
                 pinValData, minPinLen);
        evt.addMessage(new SimpleMsg("result", "Verification status", r ? "valid" : "invalid"));
        return r;
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
View Full Code Here

Examples of org.jpos.util.SimpleMsg

    @Override
    public EncryptedPIN deriveIBMPIN(String accountNo, SecureDESKey pvk,
                                     String decTab, String pinValData,
                                     int minPinLen, String offset) throws SMException {
      SimpleMsg[] cmdParameters = {
        new SimpleMsg("parameter", "account number", accountNo),
        new SimpleMsg("parameter", "Offset", offset),
        new SimpleMsg("parameter", "PVK", pvk),
        new SimpleMsg("parameter", "Decimalisation table", decTab),
        new SimpleMsg("parameter", "PIN validation data", pinValData),
        new SimpleMsg("parameter", "Minimum PIN length", minPinLen)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Derive a PIN Using the IBM Method", cmdParameters));
      EncryptedPIN result = null;
      try {
        result = deriveIBMPINImpl(accountNo, pvk, decTab,  pinValData, minPinLen,  offset);
        evt.addMessage(new SimpleMsg("result", "Derived PIN", result));
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
        Logger.log(evt);
View Full Code Here

Examples of org.jpos.util.SimpleMsg

    @Override
    public String calculateCVV(String accountNo, SecureDESKey cvkA, SecureDESKey cvkB,
                               Date expDate, String serviceCode) throws SMException {

      SimpleMsg[] cmdParameters = {
            new SimpleMsg("parameter", "account number", accountNo),
            new SimpleMsg("parameter", "cvk-a", cvkA == null ? "" : cvkA),
            new SimpleMsg("parameter", "cvk-b", cvkB == null ? "" : cvkB),
            new SimpleMsg("parameter", "Exp date", expDate),
            new SimpleMsg("parameter", "Service code", serviceCode)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Calculate CVV/CVC", cmdParameters));
      String result = null;
      try {
        result = calculateCVVImpl(accountNo, cvkA, cvkB, expDate, serviceCode);
        evt.addMessage(new SimpleMsg("result", "Calculated CVV/CVC", result));
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
        Logger.log(evt);
View Full Code Here

Examples of org.jpos.util.SimpleMsg

    @Override
    public String calculateCAVV(String accountNo, SecureDESKey cvk, String upn,
                                String authrc, String sfarc) throws SMException {

      List<Loggeable> cmdParameters = new ArrayList<Loggeable>();
      cmdParameters.add(new SimpleMsg("parameter", "account number", accountNo));
      cmdParameters.add(new SimpleMsg("parameter", "cvk", cvk == null ? "" : cvk));
      cmdParameters.add(new SimpleMsg("parameter", "unpredictable number", upn));
      cmdParameters.add(new SimpleMsg("parameter", "auth rc", authrc));
      cmdParameters.add(new SimpleMsg("parameter", "second factor auth rc", sfarc));
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Calculate CAVV/AAV", cmdParameters));
      String result = null;
      try {
          result = calculateCAVVImpl(accountNo, cvk, upn, authrc, sfarc);
          evt.addMessage(new SimpleMsg("result", "Calculated CAVV/AAV", result));
      } catch (Exception e) {
          evt.addMessage(e);
          throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
          Logger.log(evt);
View Full Code Here

Examples of org.jpos.util.SimpleMsg

    @Override
    public boolean verifyCVV(String accountNo , SecureDESKey cvkA, SecureDESKey cvkB,
                            String cvv, Date expDate, String serviceCode) throws SMException {

      SimpleMsg[] cmdParameters = {
            new SimpleMsg("parameter", "account number", accountNo),
            new SimpleMsg("parameter", "cvk-a", cvkA == null ? "" : cvkA),
            new SimpleMsg("parameter", "cvk-b", cvkB == null ? "" : cvkB),
            new SimpleMsg("parameter", "CVV/CVC", cvv),
            new SimpleMsg("parameter", "Exp date", expDate),
            new SimpleMsg("parameter", "Service code", serviceCode)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Verify CVV/CVC", cmdParameters));
      try {
        boolean r = verifyCVVImpl(accountNo, cvkA, cvkB, cvv, expDate, serviceCode);
        evt.addMessage(new SimpleMsg("result", "Verification status", r ? "valid" : "invalid"));
        return r;
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
View Full Code Here

Examples of org.jpos.util.SimpleMsg

    @Override
    public boolean verifyCAVV(String accountNo, SecureDESKey cvk, String cavv,
                              String upn, String authrc, String sfarc) throws SMException {

      List<Loggeable> cmdParameters = new ArrayList<Loggeable>();
      cmdParameters.add(new SimpleMsg("parameter", "account number", accountNo));
      cmdParameters.add(new SimpleMsg("parameter", "cvk", cvk == null ? "" : cvk));
      cmdParameters.add(new SimpleMsg("parameter", "cavv", cavv == null ? "" : cavv));
      cmdParameters.add(new SimpleMsg("parameter", "unpredictable number", upn));
      cmdParameters.add(new SimpleMsg("parameter", "auth rc", authrc));
      cmdParameters.add(new SimpleMsg("parameter", "second factor auth rc", sfarc));
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Verify CAVV/AAV", cmdParameters));
      boolean r = false;
      try {
          r = verifyCAVVImpl(accountNo, cvk, cavv, upn, authrc, sfarc);
          evt.addMessage(new SimpleMsg("result", "Verification status", r));
      } catch (Exception e) {
          evt.addMessage(e);
          throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
          Logger.log(evt);
View Full Code Here

Examples of org.jpos.util.SimpleMsg

    public boolean verifydCVV(String accountNo, SecureDESKey imkac, String dcvv,
                     Date expDate, String serviceCode, byte[] atc, MKDMethod mkdm)
                     throws SMException {

      SimpleMsg[] cmdParameters = {
            new SimpleMsg("parameter", "account number", accountNo),
            new SimpleMsg("parameter", "imk-ac", imkac == null ? "" : imkac),
            new SimpleMsg("parameter", "dCVV", dcvv),
            new SimpleMsg("parameter", "Exp date", expDate),
            new SimpleMsg("parameter", "Service code", serviceCode),
            new SimpleMsg("parameter", "atc", atc == null ? "" : ISOUtil.hexString(atc)),
            new SimpleMsg("parameter", "mkd method", mkdm)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Verify dCVV", cmdParameters));
      try {
        boolean r = verifydCVVImpl(accountNo, imkac, dcvv, expDate, serviceCode, atc, mkdm);
        evt.addMessage(new SimpleMsg("result", "Verification status", r ? "valid" : "invalid"));
        return r;
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
View Full Code Here

Examples of org.jpos.util.SimpleMsg

    public boolean verifyCVC3(SecureDESKey imkcvc3, String accountNo, String acctSeqNo,
                     byte[] atc, byte[] upn, byte[] data, MKDMethod mkdm, String cvc3)
                     throws SMException {

      SimpleMsg[] cmdParameters = {
            new SimpleMsg("parameter", "imk-cvc3", imkcvc3 == null ? "" : imkcvc3),
            new SimpleMsg("parameter", "account number", accountNo),
            new SimpleMsg("parameter", "accnt seq no", acctSeqNo),
            new SimpleMsg("parameter", "atc", atc == null ? "" : ISOUtil.hexString(atc)),
            new SimpleMsg("parameter", "upn", upn == null ? "" : ISOUtil.hexString(upn)),
            new SimpleMsg("parameter", "data", data == null ? "" : ISOUtil.hexString(data)),
            new SimpleMsg("parameter", "mkd method", mkdm),
            new SimpleMsg("parameter", "cvc3", cvc3)
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Verify CVC3", cmdParameters));
      try {
        boolean r = verifyCVC3Impl( imkcvc3, accountNo, acctSeqNo, atc, upn, data, mkdm, cvc3);
        evt.addMessage(new SimpleMsg("result", "Verification status", r ? "valid" : "invalid"));
        return r;
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
View Full Code Here

Examples of org.jpos.util.SimpleMsg

    public boolean verifyARQC(MKDMethod mkdm, SKDMethod skdm, SecureDESKey imkac
            ,String accoutNo, String acctSeqNo, byte[] arqc, byte[] atc
            ,byte[] upn, byte[] transData) throws SMException {

      SimpleMsg[] cmdParameters = {
            new SimpleMsg("parameter", "mkd method", mkdm),
            new SimpleMsg("parameter", "skd method", skdm),
            new SimpleMsg("parameter", "imk-ac", imkac),
            new SimpleMsg("parameter", "account number", accoutNo),
            new SimpleMsg("parameter", "accnt seq no", acctSeqNo),
            new SimpleMsg("parameter", "arqc", arqc == null ? "" : ISOUtil.hexString(arqc)),
            new SimpleMsg("parameter", "atc", atc == null ? "" : ISOUtil.hexString(atc)),
            new SimpleMsg("parameter", "upn", upn == null ? "" : ISOUtil.hexString(upn)),
            new SimpleMsg("parameter", "trans. data", transData == null ? "" : ISOUtil.hexString(transData))
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Verify ARQC/TC/AAC", cmdParameters));
      try {
        boolean r = verifyARQCImpl( mkdm, skdm, imkac, accoutNo, acctSeqNo, arqc, atc, upn, transData);
        evt.addMessage(new SimpleMsg("result", "Verification status", r ? "valid" : "invalid"));
        return r;
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
View Full Code Here

Examples of org.jpos.util.SimpleMsg

            ,String accoutNo, String acctSeqNo, byte[] arqc, byte[] atc, byte[] upn
            ,ARPCMethod arpcMethod, byte[] arc, byte[] propAuthData)
            throws SMException {

      SimpleMsg[] cmdParameters = {
            new SimpleMsg("parameter", "mkd method", mkdm),
            new SimpleMsg("parameter", "skd method", skdm),
            new SimpleMsg("parameter", "imk-ac", imkac),
            new SimpleMsg("parameter", "account number", accoutNo),
            new SimpleMsg("parameter", "accnt seq no", acctSeqNo),
            new SimpleMsg("parameter", "arqc", arqc == null ? "" : ISOUtil.hexString(arqc)),
            new SimpleMsg("parameter", "atc", atc == null ? "" : ISOUtil.hexString(atc)),
            new SimpleMsg("parameter", "upn", upn == null ? "" : ISOUtil.hexString(upn)),
            new SimpleMsg("parameter", "arpc gen. method", arpcMethod),
            new SimpleMsg("parameter", "auth. rc", arc == null ? "" : ISOUtil.hexString(arc)),
            new SimpleMsg("parameter", "prop auth. data", propAuthData == null
                                       ? "" : ISOUtil.hexString(propAuthData))
      };
      LogEvent evt = new LogEvent(this, "s-m-operation");
      evt.addMessage(new SimpleMsg("command", "Genarate ARPC", cmdParameters));
      try {
        byte[] result = generateARPCImpl( mkdm, skdm, imkac, accoutNo, acctSeqNo
                           ,arqc, atc, upn, arpcMethod, arc, propAuthData );
        evt.addMessage(new SimpleMsg("result", "Generated ARPC", result));
        return result;
      } catch (Exception e) {
        evt.addMessage(e);
        throw e instanceof SMException ? (SMException) e : new SMException(e);
      } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.