Exemple #1
0
 public String signString(String toSign) {
   String signature;
   try {
     signature =
         CryptoStreams.base64(CryptoStreams.mac(InputSuppliers.of(toSign), crypto.hmacSHA1(key)));
   } catch (Exception e) {
     throw new HttpException("error signing request", e);
   }
   return signature;
 }