public String digest(V script) {
   try {
     MessageDigest md = MessageDigest.getInstance("SHA1");
     md.update(codec.encodeValue(script));
     return new String(Base16.encode(md.digest(), false));
   } catch (NoSuchAlgorithmException e) {
     throw new RedisException("JVM does not support SHA1");
   }
 }
Exemple #2
0
 public CommandArgs<K, V> addValue(V value) {
   return write(codec.encodeValue(value));
 }