37 #ifndef VIRGIL_CRYPTO_BYTE_ARRAY_UTILS_H
38 #define VIRGIL_CRYPTO_BYTE_ARRAY_UTILS_H
42 #include <virgil/crypto/VirgilByteArray.h>
44 namespace virgil {
namespace crypto {
61 static VirgilByteArray
jsonToBytes(
const std::string& json);
71 static std::string
bytesToString(
const VirgilByteArray& array);
78 static VirgilByteArray
hexToBytes(
const std::string& hexStr);
87 static std::string
bytesToHex(
const VirgilByteArray& array,
bool formatted =
false);
94 static void zeroize(VirgilByteArray& array);
static void zeroize(VirgilByteArray &array)
Make all bytes zero.
static std::string bytesToHex(const VirgilByteArray &array, bool formatted=false)
Translate given byte array to the HEX string.
static VirgilByteArray jsonToBytes(const std::string &json)
Represents given JSON object as byte array in canonical form.
static VirgilByteArray hexToBytes(const std::string &hexStr)
Translate given HEX string to the byte array.
Definition: VirgilAsn1Compatible.h:46
This class contains conversion utils for byte sequence.
Definition: VirgilByteArrayUtils.h:49
static VirgilByteArray stringToBytes(const std::string &str)
Represents given string as byte array.
static std::string bytesToString(const VirgilByteArray &array)
Represent given byte array as string.