1 /* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.server.uwb.secure.iso7816; 17 18 /** A sampling of constants defined by ISO7816. */ 19 public abstract class Iso7816Constants { 20 public static final byte CLA_BASE = 0x00; 21 22 public static final byte CLA_PROPRIETARY = (byte) 0x80; 23 24 // ISO7816-4 CLA mask indicating that command chaining is being used 25 public static final byte CLA_COMMAND_CHAINING_MASK = (byte) 0x10; 26 27 public static final byte INS_SELECT = (byte) 0xA4; 28 29 public static final byte INS_READ_RECORD = (byte) 0xB2; 30 31 public static final byte INS_GET_DATA = (byte) 0xCA; 32 33 public static final byte INS_GET_PROCSESSING_OPTIONS = (byte) 0xA8; 34 35 public static final byte OFFSET_CLA = 0; 36 37 public static final byte OFFSET_INS = 1; 38 39 public static final byte OFFSET_P1 = 2; 40 41 public static final byte OFFSET_P2 = 3; 42 43 public static final byte OFFSET_LC = 4; 44 45 public static final byte OFFSET_CDATA = 5; 46 47 /** Used with {@link #INS_SELECT} to select an application by application DF (aka AID). */ 48 public static final byte P1_SELECT_BY_DEDICATED_FILE_NAME = (byte) 0x04; 49 50 public static final byte TAG_LIST = (byte) 0x5C; 51 52 public static final byte EXTENDED_HEAD_LIST = (byte) 0x4D; 53 Iso7816Constants()54 private Iso7816Constants() { 55 } 56 } 57