Get a total count of unique digests

 @param [String] digest a key pattern to match with
161319
def delete_by_digest(digest)
      result, elapsed = timed do
        Scripts.call(:delete_by_digest, nil, keys: [UNIQUE_SET, digest])
        count
      end

      log_info("#{__method__}(#{digest}) completed in #{elapsed}ms")

      result
    end
1213191
public void updateDigest(MessageDigest digest)
  {
    if (topLevel.markedForDeleteAt != Long.MIN_VALUE)
      digest.update(ByteBufferUtil.bytes(topLevel.markedForDeleteAt));

    if (ranges != null)
      ranges.updateDigest(digest);
  }
1097968
def if_string_digest_changed(key, input, &block)
      if_string_changed(key, Digest::SHA256.new.update(input.to_s).hexdigest.to_s, &block)
    end
942183
private String getDigestHex(String algorithm, String key) {
        if (algorithm.equals("md5")) {
            return DigestUtils.md5Hex(key);
        } else if (algorithm.equals("sha")) {
            return DigestUtils.shaHex(key);
        }
        
        throw new CitrusRuntimeException("Unsupported digest algorithm: " + algorithm);
    }
898687
def count(&block)
      return keys.count unless block_given?
      proxy = HashProxy.new
      keys.inject(0) do |count, key|
        proxy.with(mapper[key], &block) ? count.succ : count
      end
    end
316932
private static byte[] digest(final byte[] input, final String algorithm, final byte[] salt, final int iterations) {
		try {
			MessageDigest digest = MessageDigest.getInstance(algorithm);

			if (salt != null) {
				digest.update(salt);
			}

			byte[] result = digest.digest(input);

			for (int i = 1; i < iterations; i++) {
				digest.reset();
				result = digest.digest(result);
			}
			return result;
		} catch (NoSuchAlgorithmException e) {
			throw new ImpossibleException(e);
		}
	}
359534
function( digest ) {

    var signature = ECDSASignature.decode( digest, 'der' )
    var length = ( this.bits / 8 | 0 ) + ( this.bits % 8 !== 0 ? 1 : 0 )

    var r = Buffer.from( signature.r.toString( 'hex', length ), 'hex' )
    var s = Buffer.from( signature.s.toString( 'hex', length ), 'hex' )

    return Buffer.concat([ r, s ], r.length + s.length )

  }
987477
def _count(self, method, limit, keywords):
        
        # The limit will be mutated, so copy it and leave the original intact
        limit = limit.copy()
        has_more = True
        count = None
        while has_more:
            limit.set_request_args(keywords)
            response = self.call(method, **keywords)
            limit.post_fetch(response)
            count += Count.from_response(response)
            last_evaluated_key = response.get('LastEvaluatedKey')
            has_more = last_evaluated_key is not None and not limit.complete
            if has_more:
                keywords['ExclusiveStartKey'] = last_evaluated_key
        return count
572737
def _from_hex_digest(digest):
    """"""
    return "".join(
        [chr(int(digest[x : x + 2], 16)) for x in range(0, len(digest), 2)]
    )
548995
function digest(message) {
    return message.id || sha1(serializeNodes(message.nodes).join('') + ("[" + message.meaning + "]"));
}
728675
def digest_password
      token = nonce + timestamp + password
      Base64.encode64(Digest::SHA1.digest(token)).chomp!
    end
331942
public boolean matches(String digest) {
        String computed = sha1();
        LOGGER.trace("Signature: calculated={} provided={}", computed, digest);
        return StringUtils.equals(computed, digest);
    }
273671
private boolean digestMatches(byte[] digest, String providedDigest) {
        return providedDigest.equalsIgnoreCase(Hex.encodeHexString(digest)) || providedDigest.equalsIgnoreCase(new String(Base64.getEncoder().encode(digest)));
    }
963695
def incr(key, count=1)
      # dalli incr is broken just like in memcache-client gem
      with_failure_grace(count) {
        set(key, get(key, 0) + count)
      }
    end
674254
def digest_io(io)
      digester = Digest::SHA1.new

      while buffer = io.read(1024)
        digester.update(buffer)
      end

      io.rewind

      Base64.encode64(digester.digest)
    end
45692
public boolean verifyDigest(int digestPos, byte[] handshakeMessage, byte[] key, int keyLen) {
        if (log.isTraceEnabled()) {
            log.trace("verifyDigest - digestPos: {} keyLen: {} handshake size: {} ", digestPos, keyLen, handshakeMessage.length);
        }
        byte[] calcDigest = new byte[DIGEST_LENGTH];
        calculateDigest(digestPos, handshakeMessage, 0, key, keyLen, calcDigest, 0);
        if (!Arrays.equals(Arrays.copyOfRange(handshakeMessage, digestPos, (digestPos + DIGEST_LENGTH)), calcDigest)) {
            return false;
        }
        return true;
    }
1350395
function calculate(digest) {
  var offset = digest[19] & 0xf;
  var code = (digest[offset] & 0x7f) << 24 | (digest[offset + 1] & 0xff) << 16 | (digest[offset + 2] & 0xff) << 8 | (digest[offset + 3] & 0xff);
  return code.toString();
}