aboutsummaryrefslogtreecommitdiff
path: root/libbutl/sha1.mxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/sha1.mxx')
-rw-r--r--libbutl/sha1.mxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbutl/sha1.mxx b/libbutl/sha1.mxx
index 5259189..7ba3c0a 100644
--- a/libbutl/sha1.mxx
+++ b/libbutl/sha1.mxx
@@ -77,6 +77,12 @@ LIBBUTL_MODEXPORT namespace butl
const char*
string () const;
+ std::string
+ abbreviated_string (std::size_t n) const
+ {
+ return std::string (string (), n < 40 ? n : 40);
+ }
+
private:
struct context // Note: identical to SHA1_CTX.
{