public class SecretKeyFactoryExtensions extends Object
SecretKeyFactory holds methods for creating SecretKeySpec
objects.| Constructor and Description |
|---|
SecretKeyFactoryExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static SecretKeyFactory |
newSecretKeyFactory(String algorithm)
Factory method for creating a new
SecretKeyFactory from the given algorithm. |
static SecretKeySpec |
newSecretKeySpec(byte[] secretKey,
String algorithm)
Factory method for creating a new
SecretKeySpec from the given algorithm and the
given secret key as byte array. |
static SecretKeySpec |
newSecretKeySpec(String algorithm,
int keyLength)
Factory method for creating a new
SecretKeySpec from the given algorithm and the
given key length. |
public static SecretKeyFactory newSecretKeyFactory(String algorithm) throws NoSuchAlgorithmException
SecretKeyFactory from the given algorithm.algorithm - the algorithmSecretKeyFactory from the given algorithm.NoSuchAlgorithmException - is thrown if instantiation of the SecretKeyFactory object fails.public static SecretKeySpec newSecretKeySpec(String algorithm, int keyLength) throws NoSuchAlgorithmException
SecretKeySpec from the given algorithm and the
given key length.algorithm - the algorithmkeyLength - the key lengthSecretKeySpec from the given algorithm and the given key length.NoSuchAlgorithmException - is thrown if instantiation of the SecretKeyFactory object fails.public static SecretKeySpec newSecretKeySpec(byte[] secretKey, String algorithm) throws NoSuchAlgorithmException
SecretKeySpec from the given algorithm and the
given secret key as byte array.algorithm - the algorithmsecretKey - the secret keySecretKeySpec from the given algorithm and the given secret key.NoSuchAlgorithmException - the no such algorithm exceptionCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.