[PATCH] D16325: Add support for computing SHA1 in LLVM

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 11:58:31 PDT 2016


ruiu added a subscriber: ruiu.

================
Comment at: include/llvm/Support/SHA1.h:34
@@ +33,3 @@
+  /// Digest more data.
+  void update(const char *data, size_t len);
+
----------------
Why don't you pass ArrayRef<uint8_t>?

================
Comment at: include/llvm/Support/SHA1.h:41-45
@@ +40,7 @@
+
+  /// Return a reference to the current SHA1 for the digested data since the
+  /// last call to init(). This is suitable for getting the SHA1 at any time
+  /// without invalidating the internal state so that more calls can be made
+  /// into update.
+  StringRef result();
+
----------------
It is not clear in this comment whether this function returns a hex string or raw bytes.


http://reviews.llvm.org/D16325





More information about the llvm-commits mailing list