public final class EncryptionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static PrivateKey |
loadDecryptionKey(String keyFilePath)
Load a RSA decryption key from a file (PEM or DER).
|
static PrivateKey |
loadDecryptionKey(String pkcs12KeyFilePath,
String decryptionKeyAlias,
String decryptionKeyPassword)
Load a RSA decryption key out of a PKCS#12 container.
|
static Certificate |
loadEncryptionCertificate(String certificatePath)
Populate a X509 encryption certificate object with the certificate data at the given file path.
|
static String |
sanitizeJson(String json) |
public static PrivateKey loadDecryptionKey(String keyFilePath) throws GeneralSecurityException, IOException
GeneralSecurityExceptionIOExceptionpublic static PrivateKey loadDecryptionKey(String pkcs12KeyFilePath, String decryptionKeyAlias, String decryptionKeyPassword) throws GeneralSecurityException, IOException
GeneralSecurityExceptionIOExceptionpublic static Certificate loadEncryptionCertificate(String certificatePath) throws CertificateException, FileNotFoundException
Copyright © 2021. All rights reserved.