Class MosipRSA
- java.lang.Object
-
- io.mosip.kernel.core.security.processor.AsymmetricProcessor
-
- io.mosip.kernel.core.security.algorithms.MosipRSA
-
public class MosipRSA extends AsymmetricProcessor
RSA Engine Initialization- Since:
- 1.0.0
- Author:
- Urvil Joshi
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]hybridRsaAesWithOAEPWithMD5AndMGF1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode)Hybrid RSA Engine Initialization with OAEP(MD5AndMGF1)Paddingstatic byte[]hybridRsaAesWithOAEPWithSHA3512AndMGF1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode)Hybrid RSA Engine Initialization with OAEP(SHA3512AndMGF1)Paddingstatic byte[]hybridRsaAesWithPKCS1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode)Hybrid RSA Engine Initialization with PKCS1Paddingstatic byte[]rsaWithOAEPWithMD5AndMGF1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode)RSA Engine Initialization with OAEP(MD5AndMGF1)Paddingstatic byte[]rsaWithOAEPWithSHA3512AndMGF1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode)RSA Engine Initialization with OAEP(SHA3512AndMGF1)Paddingstatic byte[]rsaWithPKCS1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode)RSA Engine Initialization with PKCS1Padding-
Methods inherited from class io.mosip.kernel.core.security.processor.AsymmetricProcessor
process, processHybrid
-
-
-
-
Method Detail
-
hybridRsaAesWithPKCS1Padding
public static byte[] hybridRsaAesWithPKCS1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode) throws MosipInvalidDataException, MosipInvalidKeyExceptionHybrid RSA Engine Initialization with PKCS1Padding- Parameters:
key- key for encryption/decryptiondata- data for encryption/decryptionmode- if true process mode is Encrypt ,else process mode is Decrypt- Returns:
- Processed array
- Throws:
MosipInvalidDataException- if data is not valid in length,corruptedMosipInvalidKeyException- if key is not valid in length,corrupted and wrong
-
hybridRsaAesWithOAEPWithMD5AndMGF1Padding
public static byte[] hybridRsaAesWithOAEPWithMD5AndMGF1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode) throws MosipInvalidDataException, MosipInvalidKeyExceptionHybrid RSA Engine Initialization with OAEP(MD5AndMGF1)Padding- Parameters:
key- Key for encryption/decryptiondata- Data for encryption/decryptionmode- If true process mode is Encrypt ,else process mode is Decrypt- Returns:
- Processed array
- Throws:
MosipInvalidDataException- If data is not valid in length,corruptedMosipInvalidKeyException- If key is not valid in length,corrupted and wrong
-
hybridRsaAesWithOAEPWithSHA3512AndMGF1Padding
public static byte[] hybridRsaAesWithOAEPWithSHA3512AndMGF1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode) throws MosipInvalidDataException, MosipInvalidKeyExceptionHybrid RSA Engine Initialization with OAEP(SHA3512AndMGF1)Padding- Parameters:
key- Key for encryption/decryptiondata- Data for encryption/decryptionmode- If true process mode is Encrypt ,else process mode is Decrypt- Returns:
- Processed array
- Throws:
MosipInvalidDataException- If data is not valid in length,corruptedMosipInvalidKeyException- If key is not valid in length,corrupted and wrong
-
rsaWithPKCS1Padding
public static byte[] rsaWithPKCS1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode) throws MosipInvalidDataException, MosipInvalidKeyExceptionRSA Engine Initialization with PKCS1Padding- Parameters:
key- Key for encryption/decryptiondata- Data for encryption/decryptionmode- If true process mode is Encrypt ,else process mode is Decrypt- Returns:
- Processed array
- Throws:
MosipInvalidDataException- If data is not valid in length,corruptedMosipInvalidKeyException- If key is not valid in length,corrupted and wrong
-
rsaWithOAEPWithMD5AndMGF1Padding
public static byte[] rsaWithOAEPWithMD5AndMGF1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode) throws MosipInvalidDataException, MosipInvalidKeyExceptionRSA Engine Initialization with OAEP(MD5AndMGF1)Padding- Parameters:
key- Key for encryption/decryptiondata- Data for encryption/decryptionmode- If true process mode is Encrypt ,else process mode is Decrypt- Returns:
- Processed array
- Throws:
MosipInvalidDataException- If data is not valid in length,corruptedMosipInvalidKeyException- If key is not valid in length,corrupted and wrong
-
rsaWithOAEPWithSHA3512AndMGF1Padding
public static byte[] rsaWithOAEPWithSHA3512AndMGF1Padding(org.bouncycastle.crypto.params.AsymmetricKeyParameter key, byte[] data, boolean mode) throws MosipInvalidDataException, MosipInvalidKeyExceptionRSA Engine Initialization with OAEP(SHA3512AndMGF1)Padding- Parameters:
key- Key for encryption/decryptiondata- Data for encryption/decryptionmode- If true process mode is Encrypt ,else process mode is Decrypt- Returns:
- Processed array
- Throws:
MosipInvalidDataException- If data is not valid in length,corruptedMosipInvalidKeyException- If key is not valid in length,corrupted and wrong
-
-