public String hmac512(byte[] sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS512, sharedSecret); return encode(Algorithm.HS512, data, signature); }
public String hmac256(SecretKey sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS256, sharedSecret); return encode(Algorithm.HS256, data, signature); }
public String hmac384(SecretKey sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS384, sharedSecret); return encode(Algorithm.HS384, data, signature); }
public String hmac256(byte[] sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS256, sharedSecret); return encode(Algorithm.HS256, data, signature); }
public String hmac512(SecretKey sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS512, sharedSecret); return encode(Algorithm.HS512, data, signature); }
public String hmac384(byte[] sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS384, sharedSecret); return encode(Algorithm.HS384, data, signature); }
public static boolean verify(JWSInput input, SecretKey key) { try { byte[] signature = sign(input.getContent(), input.getHeader().getAlgorithm(), key); String x = Base64Url.encode(signature); return x.equals(input.getEncodedSignature()); } catch (Exception e) { throw new RuntimeException(e); } }
public static boolean verify(JWSInput input, byte[] sharedSecret) { try { byte[] signature = sign(input.getContent(), input.getHeader().getAlgorithm(), sharedSecret); String x = Base64Url.encode(signature); return x.equals(input.getEncodedSignature()); } catch (Exception e) { throw new RuntimeException(e); } }
public String hmac512(SecretKey sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS512, sharedSecret); return encode(Algorithm.HS512, data, signature); }
public String hmac512(byte[] sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS512, sharedSecret); return encode(Algorithm.HS512, data, signature); }
public String hmac256(byte[] sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS256, sharedSecret); return encode(Algorithm.HS256, data, signature); }
public String hmac384(byte[] sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS384, sharedSecret); return encode(Algorithm.HS384, data, signature); }
public String hmac256(SecretKey sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS256, sharedSecret); return encode(Algorithm.HS256, data, signature); }
public String hmac384(SecretKey sharedSecret) { byte[] data = marshalContent(); byte[] signature = HMACProvider.sign(data, Algorithm.HS384, sharedSecret); return encode(Algorithm.HS384, data, signature); }
public static boolean verify(JWSInput input, SecretKey key) { try { byte[] signature = sign(input.getContent(), input.getHeader().getAlgorithm(), key); String x = Base64Url.encode(signature); return x.equals(input.getEncodedSignature()); } catch (Exception e) { throw new RuntimeException(e); } }
public static boolean verify(JWSInput input, byte[] sharedSecret) { try { byte[] signature = sign(input.getContent(), input.getHeader().getAlgorithm(), sharedSecret); String x = Base64Url.encode(signature); return x.equals(input.getEncodedSignature()); } catch (Exception e) { throw new RuntimeException(e); } }