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
019import java.util.Arrays;
020
021public class PukInfo {
022
023    /**
024     * <div class="zh"> 公钥 </div> <div class="en"> public Key </div>
025     */
026    private byte[] pubKey;
027
028    /**
029     * <div class="zh"> 签名信息 </div> <div class="en"> Signature Info </div>
030     */
031    private byte[] sigInfo;
032    
033    private String owner;
034
035    public PukInfo(byte[] pubKey, byte[] sigInfo) {
036        this.pubKey = pubKey;
037        this.sigInfo = sigInfo;
038        if (null != sigInfo && sigInfo.length >= 26) {
039            owner = new String(Arrays.copyOfRange(sigInfo, 10, 26)).trim();
040        }
041    }
042
043    /**
044     * <div class="zh"> 获取公钥 </div> <div class="en"> Get public Key </div>
045     * 
046     * @return
047     */
048    public byte[] getPubKey() {
049        return pubKey;
050    }
051
052    /**
053     * <div class="zh"> 获取签名信息 </div> <div class="en"> Get signature Info </div>
054     * 
055     * @return
056     */
057    public byte[] getSigInfo() {
058        return sigInfo;
059    }
060
061    /**
062     * <div class="zh">获取所有者。</div> <div class="en">Get the owner.</div>
063     * @return <div class="zh">所有者。</div> <div class="en">The owner.</div>
064     * @since V3.19.00
065     */
066    public String getOwner() {
067        return owner;
068    }
069}