Class BCHelper
- java.lang.Object
-
- network.oxalis.ng.commons.bouncycastle.BCHelper
-
public class BCHelper extends Object
Collection of functionality related to BouncyCastle.- Since:
- 4.0.0
- Author:
- erlend
-
-
Constructor Summary
Constructors Constructor Description BCHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MessageDigestgetMessageDigest(String algorithm)Creates a MessageDigest object using the BouncyCastle provider.static voidregisterProvider()Registers BouncyCastle as provider if not already registered.
-
-
-
Method Detail
-
registerProvider
public static void registerProvider()
Registers BouncyCastle as provider if not already registered.
-
getMessageDigest
public static MessageDigest getMessageDigest(String algorithm) throws NoSuchAlgorithmException
Creates a MessageDigest object using the BouncyCastle provider. ExceptionNoSuchProviderExceptionis disguised asNoSuchAlgorithmException.- Parameters:
algorithm- Algorithm to be use to create the MessageDigest object.- Returns:
- MessageDigest object ready for use.
- Throws:
NoSuchAlgorithmException- Thrown in cases when unknown algorithms are requestes.
-
-