JavaCard Connect

JavaCard Connect is a framework which provides an implementation of a secure communication protocol(s) in conformance with the Global Platform Card Specification.

Лицензия

Лицензия

Группа

Группа

org.nightcode
Идентификатор

Идентификатор

jc-connect
Последняя версия

Последняя версия

0.1.8
Дата

Дата

Тип

Тип

jar
Описание

Описание

JavaCard Connect
JavaCard Connect is a framework which provides an implementation of a secure communication protocol(s) in conformance with the Global Platform Card Specification.
Ссылка на сайт

Ссылка на сайт

http://github.com/nightcode/jcconnect/
Система контроля версий

Система контроля версий

http://github.com/nightcode/jcconnect/

Скачать jc-connect

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.nightcode/jc-connect/ -->
<dependency>
    <groupId>org.nightcode</groupId>
    <artifactId>jc-connect</artifactId>
    <version>0.1.8</version>
</dependency>
// https://jarcasting.com/artifacts/org.nightcode/jc-connect/
implementation 'org.nightcode:jc-connect:0.1.8'
// https://jarcasting.com/artifacts/org.nightcode/jc-connect/
implementation ("org.nightcode:jc-connect:0.1.8")
'org.nightcode:jc-connect:jar:0.1.8'
<dependency org="org.nightcode" name="jc-connect" rev="0.1.8">
  <artifact name="jc-connect" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.nightcode', module='jc-connect', version='0.1.8')
)
libraryDependencies += "org.nightcode" % "jc-connect" % "0.1.8"
[org.nightcode/jc-connect "0.1.8"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.nightcode : bertool jar 0.5
org.bouncycastle : bcprov-jdk15on jar 1.60
org.bouncycastle : bcpkix-jdk15on jar 1.60
com.google.code.findbugs : jsr305 jar 3.0.2

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.easymock : easymock jar 3.6

Модули Проекта

Данный проект не имеет модулей.

JavaCard Connect

Build Status Maven Central

JavaCard Connect is a framework which provides an implementation of a secure communication protocol in conformance with the Global Platform Card Specification. It allows to establish a secure channel between an off-card entity and a card.

How to use

code

  TerminalFactory tf = TerminalFactory.getInstance("PC/SC", null);
  CardTerminals terminals = tf.terminals();
  CardTerminal terminal = terminals.list(CardTerminals.State.CARD_PRESENT).get(0);
  Card card = terminal.connect("*");

  CardChannelService service = new CardChannelServiceImpl(KeyProvider.DEFAULT); 


  CardProperties cardProperties = CardProperties.builder()
      .aid(Aid.parse("A000000151000000"))
      .keyVersionNumber((byte) 0xFF)
      .scpVersion(ScpVersion.SCP_02)
      .build();

  CardChannelContext context = service.createCardChannelContext(cardProperties, new PlainApduChannel(card.getBasicChannel()));
  SecureChannelSession channelSession = service.createSecureChannelSession(context);

  channelSession.openSecureChannel(EnumSet.of(SecurityLevel.C_MAC));

  // GET STATUS command
  CommandAPDU command = new CommandAPDU(0x80, 0xF2, 0x40, 0x00, new byte[] {0x4F, 0x00});
  ResponseAPDU response = channelSession.transmit(command);

Download

Download the latest jar via Maven:

<dependency>
  <groupId>org.nightcode</groupId>
  <artifactId>jc-connect</artifactId>
  <version>0.1.8</version>
</dependency>

License


Feedback is welcome. Please don't hesitate to open up a new github issue or simply drop me a line at dmitry@nightcode.org.

Версии библиотеки

Версия
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1