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