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