org.keycloak.jose.jws.crypto

## Class HMACProvider

- java.lang.Object
- - org.keycloak.jose.jws.crypto.HMACProvider

- All Implemented Interfaces:
    SignatureProvider

      public class HMACProvider
      extends Object
      implements SignatureProvider

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HMACProvider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `sign(byte[] data, Algorithm algorithm, byte[] sharedSecret)`
    `static byte[]` | `sign(byte[] data, Algorithm algorithm, SecretKey key)`
    `static boolean` | `verify(JWSInput input, byte[] sharedSecret)`
    `static boolean` | `verify(JWSInput input, SecretKey key)`
    `boolean` | `verify(JWSInput input, String key)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HMACProvider

          public HMACProvider()

  - ### Method Detail

    - #### sign

          public static byte[] sign(byte[] data,
                    Algorithm algorithm,
                    byte[] sharedSecret)

    - #### sign

          public static byte[] sign(byte[] data,
                    Algorithm algorithm,
                    SecretKey key)

    - #### verify

          public static boolean verify(JWSInput input,
                       SecretKey key)

    - #### verify

          public static boolean verify(JWSInput input,
                       byte[] sharedSecret)

    - #### verify

          public boolean verify(JWSInput input,
                       String key)

      Specified by:
        `verify` in interface `SignatureProvider`

Copyright © 2015. All rights reserved.