Package javax.smartcardio

Examples of javax.smartcardio.TerminalFactory$NoneFactorySpi


      if(args.length != 1){
        System.out.println("Lozinka mora biti prvi argument!");
        System.exit(0);
      }
      String password =  args[0];
      TerminalFactory factory = TerminalFactory.getDefault();
        List<CardTerminal> terminals = null;
    try {
      terminals = factory.terminals().list();
    } catch (CardException e) {
      e.printStackTrace();
    }
        CardTerminal terminal = terminals.get(0);
      RSIDCard rsidCard = new RSIDCard(terminal);
View Full Code Here


  final static private byte LOG_OP_TOPUP      = (byte0x22;
  final static private byte LOG_OP_ISSUE      = (byte0x33;

  // CONSTRUCTOR
  public TopUpTerminal(){
    TerminalFactory    tf;
    CardTerminals      ct;
    List<CardTerminal> cs;
    Card card;

    loadBlacklist();
    CARD_LEGIT=false;
    cID="0";
    sg = Signature.getInstance(Signature.ALG_DES_MAC8_ISO9797_M2, false);
    try {
      cp = Cipher.getInstance("AES/ECB/NoPadding");
    } catch (Exception e) {
      Utilities.writeToLogs(home,"[E] "+e.toString());     
    }
    try {
      tf = TerminalFactory.getDefault();
      ct = tf.terminals();
      cs = ct.list(CardTerminals.State.CARD_PRESENT);
      if (cs.isEmpty()){
        Utilities.writeToLogs(home,"[E] No terminal with a card found!");
        System.out.println("[-] No terminal with a card found!");
        return;
View Full Code Here

  final static private byte LOG_OP_TOPUP      = (byte0x22;
  final static private byte LOG_OP_ISSUE      = (byte0x33;

  // CONSTRUCTOR
  public PaymentTerminal(){
    TerminalFactory    tf;
    CardTerminals      ct;
    List<CardTerminal> cs;
    Card card;

    loadBlacklist();
    CARD_LEGIT=false;
    cID="0";
    sg = Signature.getInstance(Signature.ALG_DES_MAC8_ISO9797_M2, false);
    try {
      cp = Cipher.getInstance("AES/ECB/NoPadding");
    } catch (Exception e) {
      Utilities.writeToLogs(home,"[E] "+e.toString());     
    }
    try {
      tf = TerminalFactory.getDefault();
      ct = tf.terminals();
      cs = ct.list(CardTerminals.State.CARD_PRESENT);
      if (cs.isEmpty()){
        Utilities.writeToLogs(home,"[E] No terminal with a card found!");
        System.out.println("[-] No terminal with a card found!");
        return;
View Full Code Here

     */
    protected void initCT()
    {
      try
      {
        TerminalFactory terminalFactory = TerminalFactory.getDefault();
        CardTerminals terminals = terminalFactory.terminals();
        if (terminals == null)
          throw new HBCI_Exception("Kein Kartenleser gefunden");
       
        List<CardTerminal> list = terminals.list();
        if (list == null || list.size() == 0)
View Full Code Here

        }
    }
   
    protected void initCT() {
        try {
            TerminalFactory terminalFactory = TerminalFactory.getDefault();
            CardTerminals terminals = terminalFactory.terminals();
            if (terminals == null)
                throw new HBCI_Exception("Kein Kartenleser gefunden");
           
            List<CardTerminal> list = terminals.list();
            if (list == null || list.size() == 0)
View Full Code Here

public class CardTerminalUtils {

  public static CardTerminal getTerminalByName(String terminalName) {
    try {
      TerminalFactory terminalFactory = TerminalFactory.getDefault();

      List<CardTerminal> terminals = terminalFactory.terminals().list();
      for (CardTerminal terminal : terminals) {
        if (terminal.getName().contains(terminalName)) {
          return terminal;
        }
      }
View Full Code Here

  }

  private static String getAvailableTerminals() {
    StringBuilder sb = new StringBuilder();
    TerminalFactory terminalFactory = TerminalFactory.getDefault();

    try {
      List<CardTerminal> terminals = terminalFactory.terminals().list();
      for (CardTerminal terminal : terminals) {
        if (sb.length() != 0) {
          sb.append(", ");
        }
        sb.append(terminal.getName());
View Full Code Here

    return getAvailableTerminal(null);
  }

  public Terminal getAvailableTerminal(String preferredTerminalName) {
    try {
      TerminalFactory terminalFactory = TerminalFactory.getDefault();
      List<CardTerminal> terminals = terminalFactory.terminals().list();
      for (CardTerminal terminal : terminals) {
        log.info("Checking terminal: " + terminal.getName());
        if (preferredTerminalName == null || preferredTerminalName.equals(terminal.getName())) {
          for (Terminal knownTerminal : knownTerminals) {
            if (knownTerminal.canHandle(terminal.getName())) {
View Full Code Here

    private synchronized CardTerminals attach() {
        if (terminals != null) {
            return terminals;
        }
        TerminalFactory factory = TerminalFactory.getDefault();
        terminals = factory.terminals();
        return terminals;
    }
View Full Code Here

        try {

            Messages.init();

            // show the list of available terminals
            TerminalFactory factory = TerminalFactory.getDefault();
            System.out.println("TerminalFactory: " + factory);

            CardTerminals terminals = factory.terminals();

            List<CardTerminal> terminalList = terminals.list();
            if(terminalList.size() == 0) {
                System.out.println("No terminals found");
                return;
View Full Code Here

TOP

Related Classes of javax.smartcardio.TerminalFactory$NoneFactorySpi

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.