All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.keyple.calypso.command.sam.CalypsoSamCommand Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
/* **************************************************************************************
 * Copyright (c) 2018 Calypso Networks Association https://www.calypsonet-asso.org/
 *
 * See the NOTICE file(s) distributed with this work for additional information
 * regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the terms of the
 * Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0
 *
 * SPDX-License-Identifier: EPL-2.0
 ************************************************************************************** */
package org.eclipse.keyple.calypso.command.sam;

import org.eclipse.keyple.core.card.command.CardCommand;

public enum CalypsoSamCommand implements CardCommand {

  /** The sam select diversifier. */
  SELECT_DIVERSIFIER("Select Diversifier", (byte) 0x14),

  /** The sam get challenge. */
  GET_CHALLENGE("Get Challenge", (byte) 0x84),

  /** The sam digest init. */
  DIGEST_INIT("Digest Init", (byte) 0x8A),

  /** The sam digest update. */
  DIGEST_UPDATE("Digest Update", (byte) 0x8C),

  /** The sam digest update multiple. */
  DIGEST_UPDATE_MULTIPLE("Digest Update Multiple", (byte) 0x8C),

  /** The sam digest close. */
  DIGEST_CLOSE("Digest Close", (byte) 0x8E),

  /** The sam digest authenticate. */
  DIGEST_AUTHENTICATE("Digest Authenticate", (byte) 0x82),

  /** The sam digest authenticate. */
  GIVE_RANDOM("Give Random", (byte) 0x86),

  /** The sam digest authenticate. */
  CARD_GENERATE_KEY("Card Generate Key", (byte) 0x12),

  /** The sam card cipher PIN. */
  CARD_CIPHER_PIN("Card Cipher PIN", (byte) 0x12),

  /** The sam unlock. */
  UNLOCK("Unlock", (byte) 0x20),

  /** The sam write key command. */
  WRITE_KEY("Write Key", (byte) 0x1A),

  READ_KEY_PARAMETERS("Read Key Parameters", (byte) 0xBC),

  READ_EVENT_COUNTER("Read Event Counter", (byte) 0xBE),

  READ_CEILINGS("Read Ceilings", (byte) 0xBE),

  SV_CHECK("SV Check", (byte) 0x58),

  SV_PREPARE_DEBIT("SV Prepare Debit", (byte) 0x54),

  SV_PREPARE_LOAD("SV Prepare Load", (byte) 0x56),

  SV_PREPARE_UNDEBIT("SV Prepare Undebit", (byte) 0x5C);

  /** The name. */
  private final String name;

  /** The instruction byte. */
  private final byte instructionByte;

  /**
   * The generic constructor of CalypsoCommands.
   *
   * @param name the name
   * @param instructionByte the instruction byte
   */
  CalypsoSamCommand(String name, byte instructionByte) {
    this.name = name;
    this.instructionByte = instructionByte;
  }

  /**
   * Gets the name.
   *
   * @return the command name
   */
  public String getName() {
    return name;
  }

  /**
   * Gets the instruction byte.
   *
   * @return the value of INS byte
   */
  public byte getInstructionByte() {
    return instructionByte;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy