public class PkeyEncryptService
extends java.lang.Object
构造器和说明 |
---|
PkeyEncryptService() |
限定符和类型 | 方法和说明 |
---|---|
byte[] |
decryptKeystoreFormat(java.lang.String password,
java.lang.String filePath)
Decrypt keystore format private key
|
byte[] |
decryptP12Format(java.lang.String password,
java.lang.String filePath)
Decrypt p12 format private key
|
byte[] |
decryptPEMFormat(java.lang.String filePath)
Decrypt pem format private key
|
void |
encryptKeyStoreFormat(java.lang.String password,
byte[] privateKey,
EccTypeEnums eccTypeEnums,
java.lang.String destinationDirectory)
Encrypt private key with keystore format
|
void |
encryptP12Format(java.lang.String password,
byte[] privateKey,
EccTypeEnums eccTypeEnums,
java.lang.String destinationDirectory)
Encrypt private key with p12 format
|
void |
encryptPEMFormat(byte[] privateKey,
EccTypeEnums eccTypeEnums,
java.lang.String destinationDirectory)
Encrypt private key with pem format
|
public void encryptKeyStoreFormat(java.lang.String password, byte[] privateKey, EccTypeEnums eccTypeEnums, java.lang.String destinationDirectory) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, KeyGenException, java.io.IOException
password
- privateKey
- eccTypeEnums
- destinationDirectory
- com.fasterxml.jackson.core.JsonGenerationException
com.fasterxml.jackson.databind.JsonMappingException
KeyGenException
java.io.IOException
public byte[] decryptKeystoreFormat(java.lang.String password, java.lang.String filePath) throws java.lang.Exception
password
- filePath
- java.io.IOException
java.lang.Exception
public void encryptP12Format(java.lang.String password, byte[] privateKey, EccTypeEnums eccTypeEnums, java.lang.String destinationDirectory) throws java.lang.Exception
password
- privateKey
- eccTypeEnums
- destinationDirectory
- java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException
java.security.NoSuchProviderException
java.io.IOException
KeyGenException
java.lang.Exception
public byte[] decryptP12Format(java.lang.String password, java.lang.String filePath) throws java.lang.Exception
password
- filePath
- java.security.UnrecoverableKeyException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException
java.security.KeyStoreException
java.security.NoSuchProviderException
java.io.IOException
java.lang.Exception
public void encryptPEMFormat(byte[] privateKey, EccTypeEnums eccTypeEnums, java.lang.String destinationDirectory) throws java.lang.Exception
privateKey
- eccTypeEnums
- destinationDirectory
- java.io.IOException
KeyGenException
java.lang.Exception
public byte[] decryptPEMFormat(java.lang.String filePath) throws java.lang.Exception
filePath
- java.io.IOException
java.lang.Exception