KeyInfo object. An example of an implementation of
this class is one that searches a java.security.KeyStore for
trusted keys that match information contained in a KeyInfo.
Whether or not the returned key is trusted and the mechanisms used to determine that is implementation-specific.
| Modifier and Type | Class and Description |
|---|---|
| public static class | KeySelector.
The purpose of the key that is to be selected. |
| private static class |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract KeySelectorResult | Returns: the result of the key selectora keyInfo, KeySelector.KeyInfo (may be null)the algorithm method that this key is to be used for.
Only keys that are compatible with the algorithm and meet the
constraints of the specified algorithm should be returned. method, XMLCryptoContext an context)XMLCryptoContext that may contain
useful information for finding an appropriate key. If this key
selector supports resolving RetrievalMethod types, the
context's baseURI and dereferencer
parameters (if specified) should be used by the selector to
resolve and dereference the URI.Attempts to find a key that satisfies the specified constraints. |
| public static KeySelector | Returns: a key selector that always selects the specified keythe sole key to be stored in the key selector key)Returns a |
| KeySelector | back to summary |
|---|---|
| protected KeySelector() Default no-args constructor; intended for invocation by subclasses only. | |
| select | back to summary |
|---|---|
| public abstract KeySelectorResult select(KeyInfo keyInfo, KeySelector. Attempts to find a key that satisfies the specified constraints.
| |
| singletonKeySelector | back to summary |
|---|---|
| public static KeySelector singletonKeySelector(Key key) Returns a
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final KeySelector. | DECRYPT
A key for decrypting. |
| public static final KeySelector. | ENCRYPT
A key for encrypting. |
| private final String | |
| public static final KeySelector. | SIGN
A key for signing. |
| public static final KeySelector. | VERIFY
A key for verifying. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: a string representation of this purposeOverrides java. Returns a string representation of this purpose ("sign", "verify", "encrypt", or "decrypt"). |
| DECRYPT | back to summary |
|---|---|
| public static final KeySelector. A key for decrypting. | |
| ENCRYPT | back to summary |
|---|---|
| public static final KeySelector. A key for encrypting. | |
| name | back to summary |
|---|---|
| private final String name | |
| SIGN | back to summary |
|---|---|
| public static final KeySelector. A key for signing. | |
| VERIFY | back to summary |
|---|---|
| public static final KeySelector. A key for verifying. | |
| Purpose | back to summary |
|---|---|
| private Purpose(String name) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this purpose ("sign", "verify", "encrypt", or "decrypt").
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public KeySelectorResult | select(KeyInfo keyInfo, KeySelector.
Implements abstract javax. Attempts to find a key that satisfies the specified constraints. |
| key | back to summary |
|---|---|
| private final Key key | |
| SingletonKeySelector | back to summary |
|---|---|
| pack-priv SingletonKeySelector(Key key) | |
| select | back to summary |
|---|---|
| public KeySelectorResult select(KeyInfo keyInfo, KeySelector. Implements abstract javax. Doc from javax. Attempts to find a key that satisfies the specified constraints.
| |