Interface RestSignatureTokenConnection
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
RestSignatureTokenConnectionImpl
@Path("/")
@Produces("application/json")
@Consumes("application/json")
public interface RestSignatureTokenConnection
extends Serializable
The server signing service for REST webService
-
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) This method signs thetoBeSigned
data with the digestdigestAlgorithm
, the maskmgf
and the givenalias
.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 digestdigestAlgorithm
and the givenalias
.signDigest
(DigestDTO digest, MaskGenerationFunction mgf, String alias) This method signs thedigest
data with a maskmgf
and the givenalias
.signDigest
(DigestDTO digest, SignatureAlgorithm signatureAlgorithm, String alias) This method signs thedigest
data with a maskmgf
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
-
getKey
Retrieves a key by its alias- Parameters:
alias
- the key alias to retrieve- Returns:
- the RemoteKeyEntry with the given alias
-
sign
@POST @Path("sign/{alias}/{algo}") SignatureValueDTO sign(ToBeSignedDTO toBeSigned, @PathParam("algo") DigestAlgorithm digestAlgorithm, @PathParam("alias") String alias) 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
-
sign
@POST @Path("sign/{alias}/{digest-algo}/{mask}") SignatureValueDTO sign(ToBeSignedDTO toBeSigned, @PathParam("digest-algo") DigestAlgorithm digestAlgorithm, @PathParam("mask") MaskGenerationFunction mgf, @PathParam("alias") String alias) 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
-
sign
@POST @Path("sign-with-signature-algo/{alias}/{signature-algo}") SignatureValueDTO sign(ToBeSignedDTO toBeSigned, @PathParam("signature-algo") SignatureAlgorithm signatureAlgorithm, @PathParam("alias") String alias) This method signs thetoBeSigned
data with the digestdigestAlgorithm
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
-
signDigest
@POST @Path("sign-digest/{alias}") SignatureValueDTO signDigest(DigestDTO digest, @PathParam("alias") String alias) 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
-
signDigest
@POST @Path("sign-digest/{alias}/{mask}") SignatureValueDTO signDigest(DigestDTO digest, @PathParam("mask") MaskGenerationFunction mgf, @PathParam("alias") String alias) 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
-
signDigest
@POST @Path("sign-digest-with-signature-algo/{alias}/{signature-algo}") SignatureValueDTO signDigest(DigestDTO digest, @PathParam("signature-algo") SignatureAlgorithm signatureAlgorithm, @PathParam("alias") String alias) This method signs thedigest
data with a maskmgf
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
-