com.biuqu.encryption.converter.PemConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bq-encryptor Show documentation
Show all versions of bq-encryptor Show documentation
easy use for mostly encryption
The newest version!
package com.biuqu.encryption.converter;
import java.io.InputStream;
/**
* Pem证书转换器
*
* @author BiuQu
* @date 2022/11/11 21:28
**/
public interface PemConverter
{
/**
* 把文件流转换成公钥二进制(PKCS#1格式,兼容OpenSSL)
*
* @param in 输入流
* @return 二进制公钥
*/
byte[] toPubKey(InputStream in);
/**
* 把文件流转换成公钥二进制(PKCS#1格式,兼容OpenSSL)
*
* @param in 输入流
* @param pwd 私钥密码
* @return 二进制公钥
*/
byte[] toPriKey(InputStream in, byte[] pwd);
/**
* 把秘钥二进制转换成文件(PKCS#1格式,兼容OpenSSL)
*
* @param key 秘钥二进制
* @param path 文件路径
*/
void toPem(byte[] key, String path);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy