|
Virgil Security Crypto library
2.0.7
|
This class contains conversion utils for byte sequence. More...
#include <VirgilByteArrayUtils.h>
Static Public Member Functions | |
| static VirgilByteArray | jsonToBytes (const std::string &json) |
| Represents given JSON object as byte array in canonical form. More... | |
| 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. | |
| static VirgilByteArray | hexToBytes (const std::string &hexStr) |
| Translate given HEX string to the byte array. More... | |
| static std::string | bytesToHex (const VirgilByteArray &array, bool formatted=false) |
| Translate given byte array to the HEX string. More... | |
| static void | zeroize (VirgilByteArray &array) |
| Make all bytes zero. More... | |
| static void | append (VirgilByteArray &dst, const VirgilByteArray &src) |
| Append given bytes to the existing one. More... | |
| static VirgilByteArray | popBytes (VirgilByteArray &src, size_t num) |
| Return first num bytes and remove it from the src. | |
This class contains conversion utils for byte sequence.
|
static |
Append given bytes to the existing one.
| dst | - destination. |
| src | - source. |
|
static |
Translate given byte array to the HEX string.
| array | - byte array. |
| formatted | - if true, endline will be inserted every 16 bytes, and all bytes will be separated with whitespaces. |
|
static |
Translate given HEX string to the byte array.
| hexStr | - HEX string. |
|
static |
Represents given JSON object as byte array in canonical form.
| VirgilCryptoException | with VirgilCryptoError::InvalidFormat, if JSON is invalid. |
| VirgilCryptoException | with VirgilCryptoError::InvalidArgument, if JSON contains unsupported data types: i.e. double. |
|
static |
Make all bytes zero.
This method SHOULD be used to securely delete sensitive data.
1.8.10