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
019public class RSAPinKey {
020
021    private int modulusLen;
022    private byte[] modulus; // 定长256, 不满自动左补0x00
023    private byte[] exponent; // 定长4, 不满自动左补0x00
024    private byte[] iccRandom; // 定长8, 不满自动左补0x00
025
026    /**
027     * <div class="zh"> 加密公钥模数长 </div> <div class="en"> modulus length </div>
028     * 
029     * @return
030     */
031    public int getModulusLen() {
032        return modulusLen;
033    }
034
035    /**
036     * <div class="zh"> 加密公钥模数长 </div> <div class="en"> modulus length </div>
037     * 
038     * @param modulusLen
039     */
040    public void setModulusLen(int modulusLen) {
041        this.modulusLen = modulusLen;
042    }
043
044    /**
045     * <div class="zh"> 加密公钥模数,高字节在前,低字节在后,不足位前补0 </div> <div class="en"> If the length of modulus is less than 512
046     * bytes, store from right, padded with 0x00 on the left </div>
047     * 
048     * @return
049     */
050    public byte[] getModulus() {
051        return modulus;
052    }
053
054    /**
055     * <div class="zh"> 加密公钥模数,高字节在前,低字节在后,不足位前补0 </div> <div class="en"> If the length of modulus is less than 512
056     * bytes, store from right, padded with 0x00 on the left </div>
057     * 
058     * @param modulus
059     */
060    public void setModulus(byte[] modulus) {
061        this.modulus = modulus;
062    }
063
064    /**
065     * <div class="zh"> 加密公钥指数,高字节在前,低字节在后,不足位前补0 </div> <div class="en"> When exponent less than 4 bytes,padded with
066     * 0x00 on the left </div>
067     * 
068     * @return
069     */
070    public byte[] getExponent() {
071        return exponent;
072    }
073
074    /**
075     * <div class="zh"> 加密公钥指数,高字节在前,低字节在后,不足位前补0 </div> <div class="en"> When exponent less than 4 bytes,padded with
076     * 0x00 on the left </div>
077     * 
078     * @param exponent
079     */
080    public void setExponent(byte[] exponent) {
081        this.exponent = exponent;
082    }
083
084    /**
085     * <div class="zh"> 从卡取得的随机数 </div> <div class="en"> the random from icc </div>
086     * 
087     * @return
088     */
089    public byte[] getIccRandom() {
090        return iccRandom;
091    }
092
093    /**
094     * <div class="zh"> 从卡取得的随机数 </div> <div class="en"> the random from icc </div>
095     * 
096     * @param iccRandom
097     */
098    public void setIccRandom(byte[] iccRandom) {
099        this.iccRandom = iccRandom;
100    }
101
102    public RSAPinKey() {
103        modulusLen = 0;
104        modulus = new byte[256];
105        exponent = new byte[4];
106        iccRandom = new byte[8];
107    }
108
109}