/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2019 Samsung Electronics Co., Ltd. All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
RawBuffer rawToHexString(const RawBuffer &raw)
{
- RawBuffer output;
-
- for (auto &e : raw) {
- char result[3];
- snprintf(result, sizeof(result), "%02X", (e & 0xff));
- output.push_back(static_cast<unsigned char>(result[0]));
- output.push_back(static_cast<unsigned char>(result[1]));
- }
-
- return output;
+ return hexDump<RawBuffer, true>(raw);
}
RawBuffer createHexPass(const RawBuffer &rawPass)