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 {
static void zeroize(VirgilByteArray &array)
Make all bytes zero.
static VirgilByteArray popBytes(VirgilByteArray &src, size_t num)
Return first num bytes and remove it from the src.
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 void append(VirgilByteArray &dst, const VirgilByteArray &src)
Append given bytes to the existing one.
static VirgilByteArray hexToBytes(const std::string &hexStr)
Translate given HEX string to the byte array.
Root namespace for all Virgil Security libraries.
Definition: VirgilAsn1Compatible.h:46
This class contains conversion utils for byte sequence.
Definition: VirgilByteArrayUtils.h:49
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:53
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.