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 */ 016package com.pax.dal.entity; 017 018/** 019 * 020 * <div class="zh">高级权限接口使用流程如下: 021 * 1.应用方生成RSA公私钥对。 022 * 2.公钥发给PAX进行PUK签名,签名时需指定Owner信息。 023 * 3.应用在调用每个高权限接口时需要传入签名公钥与ASCaller。</div> 024 * <div class="en">The usage process of the advanced permission interface is as follows: 025 * 1. The application generates RSA public-private key pairs. 026 * 2. The public key is sent to PAX for PUK signature. Owner information shall be specified during the signature. 027 * 3. The application needs to pass in the signed public key and ASCaller when calling each advanced permission interface.</div> 028 * 029 */ 030public abstract class ASCaller { 031 032 /** 033 * <div class="zh">返回私钥加密的数据。调用者需要实现此方法。</div> <div class="en">Returns data encrypted with the private key. 034 * The caller needs to implement this method.</div> 035 * 036 * @param randoms <div class="zh">系统生成的8位随机数。</div> <div class="en">The 8-bit random number generated by the system.</div> 037 * 038 * @return <div class="zh">用私钥将字符串"序列号(SN)+#+randoms+#+Owner"加密的密文。用"#"作为分割符,加密方式为:RSA/ECB/PKCS1Padding。</div> 039 * <div class="en">Encrypt ciphertext of string "serial number (SN)+#+ Randoms +#+Owner" with private key. 040 * Encrypt using "#" as divider by :RSA/ECB/PKCS1Padding.</div> 041 * 042 */ 043 public abstract byte[] getEncryptData(byte[] randoms); 044 045}