001/* 002 * =========================================================================================== 003 * = COPYRIGHT 004 * PAX Computer Technology (Shenzhen) Co., Ltd. PROPRIETARY INFORMATION 005 * This software is supplied under the terms of a license agreement or nondisclosure 006 * agreement with PAX Computer Technology (Shenzhen) Co., Ltd. and may not be copied or 007 * disclosed except in accordance with the terms in that agreement. 008 * Copyright (C) 2017-2023 PAX Computer Technology (Shenzhen) Co., Ltd. All rights reserved. 009 * Description: // Detail description about the function of this module, 010 * // interfaces with the other modules, and dependencies. 011 * Revision History: 012 * Date Author Action 013 * 2017/04/01 PAX Create/Add/Modify/Delete 014 * =========================================================================================== 015 */ 016 017package com.pax.dal.entity; 018 019 020/** 021 * <div class="zh"> 存放密钥信息的实体类 </div> <div class="en"> Entity class for storing key information</div> 022 * @since V3.25.00 023 */ 024public class KeyInfo { 025 026 private byte keyType; 027 private byte keyIndex; 028 private short keyLen; 029 private byte[] KCV; 030 private byte[] KSN; 031 032 033 public KeyInfo(byte keyType, byte keyIndex, short keyLen, byte[] KCV, byte[] KSN) { 034 this.keyType = keyType; 035 this.keyIndex = keyIndex; 036 this.keyLen = keyLen; 037 this.KCV = KCV; 038 this.KSN = KSN; 039 } 040 041 /** 042 * <div class="zh"> 获取密钥类型 </div> <div class="en"> Get key type</div> 043 * 044 * @return key type 045 */ 046 public byte getKeyType() { 047 return keyType; 048 } 049 050 /** 051 * <div class="zh"> 获取密钥索引 </div> <div class="en"> Get key index </div> 052 * 053 * @return key index 054 */ 055 public byte getKeyIndex() { 056 return keyIndex; 057 } 058 059 /** 060 * <div class="zh"> 获取密钥长度 </div> <div class="en"> Get key length </div> 061 * 062 * @return <div class="zh"> 密钥长度,对称密钥为Bytes, 非对称密钥为Bits </div> <div class="en"> Key length, symmetric key is Bytes, asymmetric key is Bits</div> 063 */ 064 public short getKeyLen() { 065 return keyLen; 066 } 067 068 /** 069 * <div class="zh"> 获取KCV </div> <div class="en"> Get KCV </div> 070 * 071 * @return KCV or "N/A" 072 */ 073 public byte[] getKCV() { 074 return KCV; 075 } 076 077 /** 078 * <div class="zh"> 获取KSN </div> <div class="en"> Get KSN </div> 079 * 080 * @return KSN 081 */ 082 public byte[] getKSN() { 083 return KSN; 084 } 085}