Java Code Examples for com.google.ipc.invalidation.common.DigestFunction#update()

The following examples show how to use com.google.ipc.invalidation.common.DigestFunction#update() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PersistenceUtils.java    From 365browser with Apache License 2.0 4 votes vote down vote up
/** Returns a message authentication code over {@code state}. */
private static Bytes generateMac(PersistentTiclState state, DigestFunction digestFn) {
  digestFn.reset();
  digestFn.update(state.toByteArray());
  return new Bytes(digestFn.getDigest());
}
 
Example 2
Source File: PersistenceUtils.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/** Returns a message authentication code over {@code state}. */
private static ByteString generateMac(PersistentTiclState state, DigestFunction digestFn) {
  digestFn.reset();
  digestFn.update(state.toByteArray());
  return ByteString.copyFrom(digestFn.getDigest());
}
 
Example 3
Source File: PersistenceUtils.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/** Returns a message authentication code over {@code state}. */
private static ByteString generateMac(PersistentTiclState state, DigestFunction digestFn) {
  digestFn.reset();
  digestFn.update(state.toByteArray());
  return ByteString.copyFrom(digestFn.getDigest());
}