PublicKeyReader, PrivateKeyReader and
PemObjectReader.@Deprecated public class KeyExtensions extends Object
KeyExtensions holds utility methods for read public and private keys from
files.| Modifier and Type | Field and Description |
|---|---|
static int |
AES_KEY_LENGTH
Deprecated.
The Constant AES_KEY_LENGTH.
|
static String |
BEGIN_PRIVATE_KEY_PREFIX
Deprecated.
The Constant BEGIN_PRIVATE_KEY_PREFIX.
|
static String |
BEGIN_PUBLIC_KEY_PREFIX
Deprecated.
The Constant BEGIN_PUBLIC_KEY_PREFIX.
|
static String |
BEGIN_RSA_PRIVATE_KEY_PREFIX
Deprecated.
The Constant BEGIN_RSA_PRIVATE_KEY_PREFIX.
|
static String |
END_PRIVATE_KEY_SUFFIX
Deprecated.
The Constant END_PRIVATE_KEY_SUFFIX.
|
static String |
END_PUBLIC_KEY_SUFFIX
Deprecated.
The Constant END_PUBLIC_KEY_SUFFIX.
|
static String |
END_RSA_PRIVATE_KEY_SUFFIX
Deprecated.
The Constant END_RSA_PRIVATE_KEY_SUFFIX.
|
| Constructor and Description |
|---|
KeyExtensions()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static PrivateKey |
readPrivateKey(byte[] privateKeyBytes,
String provider)
Deprecated.
Read private key.
|
static PrivateKey |
readPrivateKey(File file)
Deprecated.
Read private key.
|
static PublicKey |
readPublicKey(byte[] publicKeyBytes,
de.alpharogroup.crypto.provider.SecurityProvider securityProvider)
Deprecated.
Read public key.
|
static PublicKey |
readPublicKey(byte[] publicKeyBytes,
String provider)
Deprecated.
Read public key.
|
public static final int AES_KEY_LENGTH
public static final String END_PUBLIC_KEY_SUFFIX
public static final String BEGIN_PUBLIC_KEY_PREFIX
public static final String END_PRIVATE_KEY_SUFFIX
public static final String BEGIN_PRIVATE_KEY_PREFIX
public static final String END_RSA_PRIVATE_KEY_SUFFIX
public static final String BEGIN_RSA_PRIVATE_KEY_PREFIX
public static PublicKey readPublicKey(byte[] publicKeyBytes, de.alpharogroup.crypto.provider.SecurityProvider securityProvider) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException
publicKeyBytes - the public key bytessecurityProvider - the security providerNoSuchAlgorithmException - is thrown if instantiation of the cypher object fails.InvalidKeySpecException - is thrown if generation of the SecretKey object fails.NoSuchProviderException - is thrown if the specified provider is not registered in the security provider
list.public static PublicKey readPublicKey(byte[] publicKeyBytes, String provider) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException
publicKeyBytes - the public key bytesprovider - the providerNoSuchAlgorithmException - is thrown if instantiation of the cypher object fails.InvalidKeySpecException - is thrown if generation of the SecretKey object fails.NoSuchProviderException - is thrown if the specified provider is not registered in the security provider
list.public static PrivateKey readPrivateKey(File file) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException
file - the fileIOException - Signals that an I/O exception has occurred.NoSuchAlgorithmException - is thrown if instantiation of the cypher object fails.InvalidKeySpecException - is thrown if generation of the SecretKey object fails.NoSuchProviderException - is thrown if the specified provider is not registered in the security provider
list.public static PrivateKey readPrivateKey(byte[] privateKeyBytes, String provider) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException
privateKeyBytes - the private key bytesprovider - the providerNoSuchAlgorithmException - is thrown if instantiation of the cypher object fails.InvalidKeySpecException - is thrown if generation of the SecretKey object fails.NoSuchProviderException - is thrown if the specified provider is not registered in the security provider
list.Copyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.