Interface RestSignatureTokenConnection

    • Method Detail

      • getKeys

        @GET
        @Path("keys")
        List<RemoteKeyEntry> getKeys()
        Retrieves all the available keys (private keys entries) from the token.
        Returns:
        List of encapsulated private keys
      • getKey

        @GET
        @Path("key/{alias}")
        RemoteKeyEntry getKey​(@PathParam("alias")
                              String alias)
        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 the toBeSigned data with the digest digestAlgorithm and the given alias.
        Parameters:
        toBeSigned - The data that need to be signed
        digestAlgorithm - The digest algorithm to be used before signing
        alias - 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 the toBeSigned data with the digest digestAlgorithm, the mask mgf and the given alias.
        Parameters:
        toBeSigned - The data that need to be signed
        digestAlgorithm - The digest algorithm to be used before signing
        mgf - the mask generation function
        alias - 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 the digest data with the given alias.
        Parameters:
        digest - The digested data that need to be signed
        alias - 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 the digest data with a mask mgf and the given alias.
        Parameters:
        digest - The digested data that need to be signed
        mgf - the mask generation function
        alias - The key alias to be used
        Returns:
        the signature value representation with the used algorithm and the binary value