public final class CredentialSupport extends Object
Credential
instances.Modifier and Type | Method and Description |
---|---|
static Key |
extractDecryptionKey(Credential credential)
Extract the decryption key from the credential.
|
static Key |
extractEncryptionKey(Credential credential)
Extract the encryption key from the credential.
|
static Key |
extractSigningKey(Credential credential)
Extract the signing key from the credential.
|
static Key |
extractVerificationKey(Credential credential)
Extract the verification key from the credential.
|
static BasicCredential |
getSimpleCredential(PublicKey publicKey,
PrivateKey privateKey)
Get a simple, minimal credential containing a public key, and optionally a private key.
|
static BasicCredential |
getSimpleCredential(SecretKey secretKey)
Get a simple, minimal credential containing a secret (symmetric) key.
|
static BasicX509Credential |
getSimpleCredential(X509Certificate cert,
PrivateKey privateKey)
Get a simple, minimal credential containing an end-entity X.509 certificate, and optionally a private key.
|
@Nullable public static Key extractEncryptionKey(@Nullable Credential credential)
credential
- the credential containing the encryption key@Nullable public static Key extractDecryptionKey(@Nullable Credential credential)
credential
- the credential containing the decryption key@Nullable public static Key extractSigningKey(@Nullable Credential credential)
credential
- the credential containing the signing key@Nullable public static Key extractVerificationKey(@Nullable Credential credential)
credential
- the credential containing the verification key@Nonnull public static BasicCredential getSimpleCredential(@Nonnull SecretKey secretKey)
secretKey
- the symmetric key to wrap@Nonnull public static BasicCredential getSimpleCredential(@Nonnull PublicKey publicKey, @Nullable PrivateKey privateKey)
publicKey
- the public key to wrapprivateKey
- the private key to wrap, which may be null@Nonnull public static BasicX509Credential getSimpleCredential(@Nonnull X509Certificate cert, @Nullable PrivateKey privateKey)
cert
- the end-entity certificate to wrapprivateKey
- the private key to wrap, which may be nullCopyright © 2016 JBoss by Red Hat. All rights reserved.