diff options
Diffstat (limited to 'libbuild2/utility.ixx')
-rw-r--r-- | libbuild2/utility.ixx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libbuild2/utility.ixx b/libbuild2/utility.ixx index 3f9d34b..aedfc94 100644 --- a/libbuild2/utility.ixx +++ b/libbuild2/utility.ixx @@ -274,6 +274,21 @@ namespace build2 } inline void + hash_environment (sha256& cs, const cstrings& ns) + { + for (const char* n: ns) + hash_environment (cs, n); + } + + inline string + hash_environment (const cstrings& ns) + { + sha256 cs; + hash_environment (cs, ns); + return cs.string (); + } + + inline void hash_environment (sha256& cs, const strings& ns) { for (const string& n: ns) |