Class SecurityUtil
- java.lang.Object
-
- io.mosip.kernel.core.security.util.SecurityUtil
-
public class SecurityUtil extends Object
Utility class for security- Since:
- 1.0.0
- Author:
- Urvil Joshi
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.bouncycastle.crypto.params.AsymmetricKeyParameterbytesToPrivateKey(byte[] privateKey)AsymmetricKeyParameterfrom encoded private keystatic org.bouncycastle.crypto.params.AsymmetricKeyParameterbytesToPublicKey(byte[] publicKey)AsymmetricKeyParameterfrom encoded public keystatic voidcheckMethod(MosipSecurityMethod mosipSecurityMethod)This method verifies mosip security method
-
-
-
Method Detail
-
bytesToPrivateKey
public static org.bouncycastle.crypto.params.AsymmetricKeyParameter bytesToPrivateKey(byte[] privateKey) throws MosipInvalidKeyExceptionAsymmetricKeyParameterfrom encoded private key- Parameters:
privateKey- private Key for processing- Returns:
AsymmetricKeyParameterfrom encoded private key- Throws:
MosipInvalidKeyException- if key is not valid (length or form)
-
bytesToPublicKey
public static org.bouncycastle.crypto.params.AsymmetricKeyParameter bytesToPublicKey(byte[] publicKey) throws MosipInvalidKeyExceptionAsymmetricKeyParameterfrom encoded public key- Parameters:
publicKey- private Key for processing- Returns:
AsymmetricKeyParameterfrom encoded public key- Throws:
MosipInvalidKeyException- if key is not valid (length or form)
-
checkMethod
public static void checkMethod(MosipSecurityMethod mosipSecurityMethod)
This method verifies mosip security method- Parameters:
mosipSecurityMethod- mosipSecurityMethod given by user
-
-