final class ConstructKeys extends Object
| 构造器和说明 |
|---|
ConstructKeys() |
| 限定符和类型 | 方法和说明 |
|---|---|
(专用程序包) static Key |
constructKey(byte[] encoding,
String keyAlgorithm,
int keyType) |
private static PrivateKey |
constructPrivateKey(byte[] encodedKey,
String encodedKeyAlgorithm)
Construct a private key from its encoding.
|
private static PublicKey |
constructPublicKey(byte[] encodedKey,
String encodedKeyAlgorithm)
Construct a public key from its encoding.
|
private static SecretKey |
constructSecretKey(byte[] encodedKey,
String encodedKeyAlgorithm)
Construct a secret key from its encoding.
|
private static final PublicKey constructPublicKey(byte[] encodedKey, String encodedKeyAlgorithm) throws InvalidKeyException, NoSuchAlgorithmException
encodedKey - the encoding of a public key.encodedKeyAlgorithm - the algorithm the encodedKey is for.InvalidKeyExceptionNoSuchAlgorithmExceptionprivate static final PrivateKey constructPrivateKey(byte[] encodedKey, String encodedKeyAlgorithm) throws InvalidKeyException, NoSuchAlgorithmException
encodedKey - the encoding of a private key.encodedKeyAlgorithm - the algorithm the wrapped key is for.InvalidKeyExceptionNoSuchAlgorithmExceptionprivate static final SecretKey constructSecretKey(byte[] encodedKey, String encodedKeyAlgorithm)
encodedKey - the encoding of a secret key.encodedKeyAlgorithm - the algorithm the secret key is for.static final Key constructKey(byte[] encoding, String keyAlgorithm, int keyType) throws InvalidKeyException, NoSuchAlgorithmException
Copyright © 2022. All rights reserved.