Zero Trust IoT library
Loading...
Searching...
No Matches
zt-encryption-utils.cc File Reference
#include "ns3/zt-encryption-utils.h"
#include <cryptopp/hex.h>
#include <cryptopp/filters.h>
#include <cryptopp/aes.h>
#include <cryptopp/modes.h>
#include <cryptopp/osrng.h>
Include dependency graph for zt-encryption-utils.cc:

Go to the source code of this file.

Namespaces

namespace  ns3
 

Functions

std::string ns3::EncryptPayload (const std::string &data, const byte *key, std::string &ivOut)
 Encrypts a plaintext string using AES-CBC mode with a randomly generated IV.
 
std::string ns3::DecryptPayload (const std::string &cipher, const byte *key)
 Decrypts a ciphertext string encrypted with EncryptPayload.
 
SecByteBlock ns3::HexDecodeKey (const std::string &hex)
 Decodes a hex-encoded AES key string into a raw key byte block.
 
std::vector< CryptoPP::byte > ns3::HexToBytes (const std::string &hex)
 Converts a hexadecimal string into a byte vector.