# Uses of Class
javax.xml.crypto.KeySelector

Packages that use KeySelector
Package
Description
javax.xml.crypto
Common classes for XML cryptography.
javax.xml.crypto.dom
DOM-specific classes for the `javax.xml.crypto` package.
javax.xml.crypto.dsig.dom
DOM-specific classes for the `javax.xml.crypto.dsig` package.

## Uses of KeySelector in javax.xml.crypto

Methods in javax.xml.crypto that return KeySelector
Modifier and Type
Method
Description
`KeySelector`
XMLCryptoContext.`getKeySelector()`
Returns the key selector for finding a key.
`static KeySelector`
KeySelector.`singletonKeySelector(Key key)`
Returns a `KeySelector` that always selects the specified key, regardless of the `KeyInfo` passed to it.
Methods in javax.xml.crypto with parameters of type KeySelector
Modifier and Type
Method
Description
`void`
XMLCryptoContext.`setKeySelector(KeySelector ks)`
Sets the key selector for finding a key.

## Uses of KeySelector in javax.xml.crypto.dom

Methods in javax.xml.crypto.dom that return KeySelector
Modifier and Type
Method
Description
`KeySelector`
DOMCryptoContext.`getKeySelector()`
Methods in javax.xml.crypto.dom with parameters of type KeySelector
Modifier and Type
Method
Description
`void`
DOMCryptoContext.`setKeySelector(KeySelector ks)`

## Uses of KeySelector in javax.xml.crypto.dsig.dom

Constructors in javax.xml.crypto.dsig.dom with parameters of type KeySelector
Modifier
Constructor
Description
``
`DOMSignContext(KeySelector ks, Node parent)`
Creates a `DOMSignContext` with the specified key selector and parent node.
``
`DOMSignContext(KeySelector ks, Node parent, Node nextSibling)`
Creates a `DOMSignContext` with the specified key selector, parent and next sibling nodes.
``
`DOMValidateContext(KeySelector ks, Node node)`
Creates a `DOMValidateContext` containing the specified key selector and node.