Interface JWASigner

All Superinterfaces:
JWA

public interface JWASigner extends JWA

A JWA signer is used to sign data and or verify data signature.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    sign(byte[] data)
    Signs the specified data and returns the signature.
    boolean
    verify(byte[] data, byte[] signature)
    Verifies the specified signature for the specified data.

    Methods inherited from interface io.inverno.mod.security.jose.jwa.JWA

    getProcessedParameters
  • Method Details

    • sign

      byte[] sign(byte[] data) throws JWASignatureException

      Signs the specified data and returns the signature.

      Parameters:
      data - the data to sign
      Returns:
      a signature
      Throws:
      JWASignatureException - if there was an error signing data
    • verify

      boolean verify(byte[] data, byte[] signature) throws JWASignatureException

      Verifies the specified signature for the specified data.

      Parameters:
      data - the data
      signature - the signature
      Returns:
      true if the signature is valid, false otherwise
      Throws:
      JWASignatureException - if there was an error verifying signature