Class RestSignatureTokenConnectionImpl
java.lang.Object
eu.europa.esig.dss.ws.server.signing.rest.RestSignatureTokenConnectionImpl
- All Implemented Interfaces:
RestSignatureTokenConnection
,Serializable
public class RestSignatureTokenConnectionImpl extends Object implements RestSignatureTokenConnection
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description RestSignatureTokenConnectionImpl()
-
Method Summary
Modifier and Type Method Description RemoteKeyEntry
getKey(String alias)
Retrieves a key by its aliasList<RemoteKeyEntry>
getKeys()
Retrieves all the available keys (private keys entries) from the token.void
setToken(RemoteSignatureTokenConnection token)
SignatureValueDTO
sign(ToBeSignedDTO toBeSigned, DigestAlgorithm digestAlgorithm, MaskGenerationFunction mgf, String alias)
This method signs thetoBeSigned
data with the digestdigestAlgorithm
, the maskmgf
and the givenalias
.SignatureValueDTO
sign(ToBeSignedDTO toBeSigned, DigestAlgorithm digestAlgorithm, String alias)
This method signs thetoBeSigned
data with the digestdigestAlgorithm
and the givenalias
.SignatureValueDTO
signDigest(DigestDTO digest, MaskGenerationFunction mgf, String alias)
This method signs thedigest
data with a maskmgf
and the givenalias
.SignatureValueDTO
signDigest(DigestDTO digest, String alias)
This method signs thedigest
data with the givenalias
.
-
Constructor Details
-
RestSignatureTokenConnectionImpl
public RestSignatureTokenConnectionImpl()
-
-
Method Details
-
setToken
-
getKeys
Description copied from interface:RestSignatureTokenConnection
Retrieves all the available keys (private keys entries) from the token.- Specified by:
getKeys
in interfaceRestSignatureTokenConnection
- Returns:
- List of encapsulated private keys
- Throws:
DSSException
-
getKey
Description copied from interface:RestSignatureTokenConnection
Retrieves a key by its alias- Specified by:
getKey
in interfaceRestSignatureTokenConnection
- Parameters:
alias
- the key alias to retrieve- Returns:
- the RemoteKeyEntry with the given alias
- Throws:
DSSException
-
sign
public SignatureValueDTO sign(ToBeSignedDTO toBeSigned, DigestAlgorithm digestAlgorithm, String alias) throws DSSExceptionDescription copied from interface:RestSignatureTokenConnection
This method signs thetoBeSigned
data with the digestdigestAlgorithm
and the givenalias
.- Specified by:
sign
in interfaceRestSignatureTokenConnection
- Parameters:
toBeSigned
- The data that need to be signeddigestAlgorithm
- The digest algorithm to be used before signingalias
- The key alias to be used- Returns:
- The array of bytes representing the signature value
- Throws:
DSSException
-
sign
public SignatureValueDTO sign(ToBeSignedDTO toBeSigned, DigestAlgorithm digestAlgorithm, MaskGenerationFunction mgf, String alias) throws DSSExceptionDescription copied from interface:RestSignatureTokenConnection
This method signs thetoBeSigned
data with the digestdigestAlgorithm
, the maskmgf
and the givenalias
.- Specified by:
sign
in interfaceRestSignatureTokenConnection
- Parameters:
toBeSigned
- The data that need to be signeddigestAlgorithm
- The digest algorithm to be used before signingmgf
- the mask generation functionalias
- The key alias to be used- Returns:
- The array of bytes representing the signature value
- Throws:
DSSException
-
signDigest
Description copied from interface:RestSignatureTokenConnection
This method signs thedigest
data with the givenalias
.- Specified by:
signDigest
in interfaceRestSignatureTokenConnection
- Parameters:
digest
- The digested data that need to be signedalias
- The key alias to be used- Returns:
- the signature value representation with the used algorithm and the binary value
- Throws:
DSSException
-
signDigest
public SignatureValueDTO signDigest(DigestDTO digest, MaskGenerationFunction mgf, String alias) throws DSSExceptionDescription copied from interface:RestSignatureTokenConnection
This method signs thedigest
data with a maskmgf
and the givenalias
.- Specified by:
signDigest
in interfaceRestSignatureTokenConnection
- Parameters:
digest
- The digested data that need to be signedmgf
- the mask generation functionalias
- The key alias to be used- Returns:
- the signature value representation with the used algorithm and the binary value
- Throws:
DSSException
-