Class Ed25519Signer

    • Constructor Detail

      • Ed25519Signer

        public Ed25519Signer​(OctetKeyPair privateKey)
                      throws JOSEException
        Creates a new Ed25519 signer.
        Parameters:
        privateKey - The private key. Must be non-null, and must be of type Ed25519 ("crv": "Ed25519").
        Throws:
        JOSEException - If the key subtype is not supported or if the key is not a private key
    • Method Detail

      • getPrivateKey

        public OctetKeyPair getPrivateKey()
        Gets the Ed25519 private key as an OctetKeyPair.
        Returns:
        The private key.
      • sign

        public Base64URL sign​(JWSHeader header,
                              byte[] signingInput)
                       throws JOSEException
        Description copied from interface: JWSSigner
        Signs the specified input of a JWS object.
        Specified by:
        sign in interface JWSSigner
        Parameters:
        header - The JSON Web Signature (JWS) header. Must specify a supported JWS algorithm and must not be null.
        signingInput - The input to sign. Must not be null.
        Returns:
        The resulting signature part (third part) of the JWS object.
        Throws:
        JOSEException - If the JWS algorithm is not supported, if a critical header parameter is not supported or marked for deferral to the application, or if signing failed for some other internal reason.