aboutsummaryrefslogtreecommitdiff
path: root/butl/sha256.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-08-08 00:49:04 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-08-10 14:53:04 +0300
commitaa0370b08ea8a1ad679a746c7be21a874f264fb6 (patch)
tree653f6b1d8ed888691f5af5a1e57516050d71d3cb /butl/sha256.cxx
parentde07f993a54f7443db685798ae9225bbd49f0231 (diff)
Add ucase(), lcase(), casecmp(), alpha(), digit(), alnum()
Diffstat (limited to 'butl/sha256.cxx')
-rw-r--r--butl/sha256.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/butl/sha256.cxx b/butl/sha256.cxx
index 7c0b21e..fb1fcc8 100644
--- a/butl/sha256.cxx
+++ b/butl/sha256.cxx
@@ -9,9 +9,11 @@
#include <stdint.h>
#include <stddef.h> // size_t
-#include <cctype> // isxdigit(), toupper(), tolower()
+#include <cctype> // isxdigit()
#include <stdexcept> // invalid_argument
+#include <butl/utility> // ucase(), lcase()
+
using SHA256_CTX = butl::sha256::context;
extern "C"
@@ -101,7 +103,7 @@ namespace butl
if (i > 0 && i % 2 == 0)
f += ":";
- f += toupper (c);
+ f += ucase (c);
}
return f;
@@ -131,7 +133,7 @@ namespace butl
if (!isxdigit (c))
bad ();
- s += tolower (c);
+ s += lcase (c);
}
}