Commit Graph

104 Commits

Author SHA1 Message Date
Adam Simpkins
c769088f16 add Hash::sha1() factory functions
Summary:
Add some static helper functions to create Hash objects by running a SHA1 hash
on input data.

Reviewed By: wez, bolinfest

Differential Revision: D3354594

fbshipit-source-id: 6d6bfb835175e7a25c1e6e2539438bee5887a863
2016-05-27 16:36:14 -07:00
Adam Simpkins
106717e4e7 update Hash::getBytes() to return a folly::ByteRange
Summary:
Change Hash::getBytes() to return a folly::ByteRange rather than a
std::array<uint8_t, 20>.  This makes Hash more convienent to use with existing
APIs that accept a ByteRange.  (For instance, IOBuf.)

There were only 2 call sites using the existing getBytes() functionality,
and they only used the data() method on the returned std::array, so they don't
have to be updated at all to use a ByteRange.

Reviewed By: bolinfest

Differential Revision: D3354581

fbshipit-source-id: 8f2a3c196e59620fb5b0fb2caf4d1d7f26e1d2c4
2016-05-27 16:36:14 -07:00
Facebook Github Bot 8
83f42a9fa6 Include build files that were inadvertently excluded from the initial export.
fbshipit-source-id: 2c76f0d5e55d84859ad9f4841cbe6994a62446f8
2016-05-12 16:08:34 -07:00
Facebook Github Bot 5
2eeea32117 Initial commit
fbshipit-source-id: 2bcefbd0cd127cc5ea982e074ea6819d7aac3d7a
2016-05-12 14:09:13 -07:00