Package io.mosip.mimoto.util
Class CryptoCoreUtil
- java.lang.Object
-
- io.mosip.mimoto.util.CryptoCoreUtil
-
@Component public class CryptoCoreUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static byte[]VERSION_RSA_2048
-
Constructor Summary
Constructors Constructor Description CryptoCoreUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdecrypt(String data)byte[]decryptData(byte[] requestData, KeyStore.PrivateKeyEntry privateKey)static byte[]getCertificateThumbprint(Certificate cert)KeyStore.PrivateKeyEntryloadP12()byte[]parseEncryptKeyHeader(byte[] encryptedKey)byte[]symmetricDecrypt(SecretKey key, byte[] data, byte[] nonce, byte[] aad)
-
-
-
Method Detail
-
loadP12
public KeyStore.PrivateKeyEntry loadP12() throws IOException
- Throws:
IOException
-
decryptData
public byte[] decryptData(byte[] requestData, KeyStore.PrivateKeyEntry privateKey) throws Exception- Throws:
Exception
-
parseEncryptKeyHeader
public byte[] parseEncryptKeyHeader(byte[] encryptedKey)
-
symmetricDecrypt
public byte[] symmetricDecrypt(SecretKey key, byte[] data, byte[] nonce, byte[] aad) throws InvalidAlgorithmParameterException
-
getCertificateThumbprint
public static byte[] getCertificateThumbprint(Certificate cert)
-
-