aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/codec/hex/hex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/codec/hex/hex.cpp')
-rw-r--r--src/lib/codec/hex/hex.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/codec/hex/hex.cpp b/src/lib/codec/hex/hex.cpp
index 21c5a5a03..4da719320 100644
--- a/src/lib/codec/hex/hex.cpp
+++ b/src/lib/codec/hex/hex.cpp
@@ -41,7 +41,7 @@ std::string hex_encode(const byte input[],
std::string output(2 * input_length, 0);
if(input_length)
- hex_encode(&output[0], input, input_length, uppercase);
+ hex_encode(&output.front(), input, input_length, uppercase);
return output;
}
@@ -156,7 +156,7 @@ size_t hex_decode(byte output[],
const std::string& input,
bool ignore_ws)
{
- return hex_decode(output, &input[0], input.length(), ignore_ws);
+ return hex_decode(output, input.data(), input.length(), ignore_ws);
}
secure_vector<byte> hex_decode_locked(const char input[],
@@ -165,7 +165,7 @@ secure_vector<byte> hex_decode_locked(const char input[],
{
secure_vector<byte> bin(1 + input_length / 2);
- size_t written = hex_decode(&bin[0],
+ size_t written = hex_decode(bin.data(),
input,
input_length,
ignore_ws);
@@ -177,7 +177,7 @@ secure_vector<byte> hex_decode_locked(const char input[],
secure_vector<byte> hex_decode_locked(const std::string& input,
bool ignore_ws)
{
- return hex_decode_locked(&input[0], input.size(), ignore_ws);
+ return hex_decode_locked(input.data(), input.size(), ignore_ws);
}
std::vector<byte> hex_decode(const char input[],
@@ -186,7 +186,7 @@ std::vector<byte> hex_decode(const char input[],
{
std::vector<byte> bin(1 + input_length / 2);
- size_t written = hex_decode(&bin[0],
+ size_t written = hex_decode(bin.data(),
input,
input_length,
ignore_ws);
@@ -198,7 +198,7 @@ std::vector<byte> hex_decode(const char input[],
std::vector<byte> hex_decode(const std::string& input,
bool ignore_ws)
{
- return hex_decode(&input[0], input.size(), ignore_ws);
+ return hex_decode(input.data(), input.size(), ignore_ws);
}
}