All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.hutool.crypto.asymmetric.AbstractAsymmetricCrypto Maven / Gradle / Ivy

package cn.hutool.crypto.asymmetric;

import java.security.PrivateKey;
import java.security.PublicKey;

/**
 * 抽象的非对称加密对象,包装了加密和解密为Hex和Base64的封装
 *
 * @param  返回自身类型
 * @author Looly
 */
public abstract class AbstractAsymmetricCrypto>
		extends BaseAsymmetric
		implements AsymmetricEncryptor, AsymmetricDecryptor{
	private static final long serialVersionUID = 1L;

	// ------------------------------------------------------------------ Constructor start
	/**
	 * 构造
	 * 

* 私钥和公钥同时为空时生成一对新的私钥和公钥
* 私钥和公钥可以单独传入一个,如此则只能使用此钥匙来做加密或者解密 * * @param algorithm 算法 * @param privateKey 私钥 * @param publicKey 公钥 * @since 3.1.1 */ public AbstractAsymmetricCrypto(String algorithm, PrivateKey privateKey, PublicKey publicKey) { super(algorithm, privateKey, publicKey); } // ------------------------------------------------------------------ Constructor end }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy