?? keyrecoverycaserviceresponse.java
字號:
/************************************************************************* * * * EJBCA: The OpenSource Certificate Authority * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package se.anatom.ejbca.ca.caadmin.extendedcaservices;import java.io.Serializable;import java.security.KeyPair;/** * Class used when delevering key recovery service response from a CA. * * @version $Id: KeyRecoveryCAServiceResponse.java,v 1.2 2004/04/16 07:38:57 anatom Exp $ */public class KeyRecoveryCAServiceResponse extends ExtendedCAServiceResponse implements Serializable { public final static int TYPE_ENCRYPTKEYSRESPONSE = 1; public final static int TYPE_DECRYPTKEYSRESPONSE = 1; private int type; private byte[] keydata; private KeyPair keypair; public KeyRecoveryCAServiceResponse(int type, byte[] keydata) { this.type=type; this.keydata=keydata; } public KeyRecoveryCAServiceResponse(int type, KeyPair keypair) { this.type=type; this.keypair=keypair; } /** * @return type of response, one of the TYPE_ constants. */ public int getType(){ return type; } /** * Method returning the encrypted key data if the type of response * is TYPE_ENCRYPTRESPONSE, null otherwise. */ public byte[] getKeyData(){ if(type != TYPE_ENCRYPTKEYSRESPONSE) return null; return keydata; } /** * Method returning the decrypted keypair if the type of response * is TYPE_DECRYPTRESPONSE, null otherwise. */ public KeyPair getKeyPair(){ if(type != TYPE_DECRYPTKEYSRESPONSE) return null; return keypair; } }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -