diff options
Diffstat (limited to 'third_party/nix/src/libutil/hash.cc')
-rw-r--r-- | third_party/nix/src/libutil/hash.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/third_party/nix/src/libutil/hash.cc b/third_party/nix/src/libutil/hash.cc index 426096e73af8..9d14ad9dfe14 100644 --- a/third_party/nix/src/libutil/hash.cc +++ b/third_party/nix/src/libutil/hash.cc @@ -158,6 +158,10 @@ bool Hash::IsValidBase32(absl::string_view s) { return true; } +std::string Hash::ToStorePathHash() const { + return compressHash(*this, kStorePathHashSize).to_string(Base32, false); +} + static std::string printHash32(const Hash& hash) { assert(hash.hashSize); size_t len = hash.base32Len(); |