public String signWith(byte[] key) {
   return signWith(
       JwsUtils.getHmacSignatureProvider(
           key, SignatureAlgorithm.getAlgorithm(headers.getAlgorithm())));
 }
 public String signWith(PrivateKey key) {
   return signWith(
       JwsUtils.getPrivateKeySignatureProvider(
           key, SignatureAlgorithm.getAlgorithm(headers.getAlgorithm())));
 }
Beispiel #3
0
 public SignatureAlgorithm getSignatureAlgorithm() {
   String algo = super.getAlgorithm();
   return algo == null ? null : SignatureAlgorithm.getAlgorithm(algo);
 }
 public String signWith(JsonWebKey jwk) {
   return signWith(
       JwsUtils.getSignatureProvider(
           jwk, SignatureAlgorithm.getAlgorithm(headers.getAlgorithm())));
 }
Beispiel #5
0
 public void setSignatureAlgorithm(SignatureAlgorithm algo) {
   super.setAlgorithm(algo.getJwaName());
 }