Interface RemoteSignatureTokenConnection
- All Known Implementing Classes:
RemoteSignatureTokenConnectionImpl
public interface RemoteSignatureTokenConnection
The interface used for a remote signing
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a key by its aliasgetKeys()
Retrieves all the available keys (private keys entries) from the token.sign
(ToBeSignedDTO toBeSigned, DigestAlgorithm digestAlgorithm, MaskGenerationFunction mgf, String alias) Deprecated.since DSS 6.1.sign
(ToBeSignedDTO toBeSigned, DigestAlgorithm digestAlgorithm, String alias) This method signs thetoBeSigned
data with the digestdigestAlgorithm
and the givenalias
.sign
(ToBeSignedDTO toBeSigned, SignatureAlgorithm signatureAlgorithm, String alias) This method signs thetoBeSigned
data with the digestsignatureAlgorithm
and the givenalias
.signDigest
(DigestDTO digest, MaskGenerationFunction mgf, String alias) Deprecated.since DSS 6.1.signDigest
(DigestDTO digest, SignatureAlgorithm signatureAlgorithm, String alias) This method signs thedigest
data with asignatureAlgorithm
and the givenalias
.signDigest
(DigestDTO digest, String alias) This method signs thedigest
data with the givenalias
.
-
Method Details
-
getKeys
Retrieves all the available keys (private keys entries) from the token.- Returns:
- List of encapsulated private keys
- Throws:
DSSException
- If there is any problem during the retrieval process
-
getKey
Retrieves a key by its alias- Parameters:
alias
- the key alias to retrieve- Returns:
- the RemoteKeyEntry with the given alias
- Throws:
DSSException
-
sign
SignatureValueDTO sign(ToBeSignedDTO toBeSigned, DigestAlgorithm digestAlgorithm, String alias) throws DSSException This method signs thetoBeSigned
data with the digestdigestAlgorithm
and the givenalias
.- 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
- If there is any problem during the signature process
-
sign
@Deprecated SignatureValueDTO sign(ToBeSignedDTO toBeSigned, DigestAlgorithm digestAlgorithm, MaskGenerationFunction mgf, String alias) throws DSSException Deprecated.since DSS 6.1. Please use#sign(toBeSigned, signatureAlgorithm, alias)
method instead in order to specify the target algorithm with a mask generation function (i.e. RSA for none MGF, RSASSA-PSS for MGF1)This method signs thetoBeSigned
data with the digestdigestAlgorithm
, the maskmgf
and the givenalias
.- 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
- If there is any problem during the signature process
-
sign
SignatureValueDTO sign(ToBeSignedDTO toBeSigned, SignatureAlgorithm signatureAlgorithm, String alias) throws DSSException This method signs thetoBeSigned
data with the digestsignatureAlgorithm
and the givenalias
.- Parameters:
toBeSigned
- The data that need to be signedsignatureAlgorithm
- The signature algorithm to be used for signingalias
- The key alias to be used- Returns:
- The array of bytes representing the signature value
- Throws:
DSSException
- If there is any problem during the signature process
-
signDigest
This method signs thedigest
data with the givenalias
.- 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
- If there is any problem during the signature process
-
signDigest
@Deprecated SignatureValueDTO signDigest(DigestDTO digest, MaskGenerationFunction mgf, String alias) throws DSSException Deprecated.since DSS 6.1. Please use#signDigest
method instead in order to specify the target algorithm with a mask generation function (i.e. RSA for none MGF, RSASSA-PSS for MGF1)This method signs thedigest
data with a maskmgf
and the givenalias
.- 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
- If there is any problem during the signature process
-
signDigest
SignatureValueDTO signDigest(DigestDTO digest, SignatureAlgorithm signatureAlgorithm, String alias) throws DSSException This method signs thedigest
data with asignatureAlgorithm
and the givenalias
.- Parameters:
digest
- The digested data that need to be signedsignatureAlgorithm
- The signature algorithm to be used for signingalias
- The key alias to be used- Returns:
- the signature value representation with the used algorithm and the binary value
- Throws:
DSSException
- If there is any problem during the signature process
-