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