Skip to content

cvedia::rt::EncryptionImpl

Inherits from Encryption

Public Functions

Name
EncryptionImpl(std::string const & password)
EncryptionImpl(nlohmann::json const & j)
~EncryptionImpl() override
virtual void resetIv() override
virtual expected< std::string > getIvString() override
virtual std::vector< unsigned char > getIvBytes() override
virtual size_t getIvSize() override
virtual expected< void > setIvString(std::string const & iv) override
virtual expected< void > setIvBytes(std::vector< unsigned char > iv) override
virtual NODISCARD expected< std::string > decryptString(std::string const & message) override
virtual NODISCARD expected< std::string > encryptString(std::string const & message) override
virtual NODISCARD expected< std::vector< unsigned char > > decryptBytes(std::vector< unsigned char > const & data) override
virtual NODISCARD expected< std::vector< unsigned char > > encryptBytes(std::vector< unsigned char > const & data) override
std::unique_ptr< iface::Encryption > create(std::string const & password)
std::string getBackendAPIUrl()
expected< RSA * > getPrivateKey()
NODISCARD expected< EncryptedAsset > pkhEncryptAsset(std::vector< unsigned char > const input)
NODISCARD expected< std::vector< unsigned char > > pkhDecryptAsset(EncryptedAsset asset)

Additional inherited members

Public Functions inherited from Encryption

Name
virtual ~Encryption() =default

Public Functions Documentation

function EncryptionImpl

explicit EncryptionImpl(
    std::string const & password
)

function EncryptionImpl

explicit EncryptionImpl(
    nlohmann::json const & j
)

function ~EncryptionImpl

~EncryptionImpl() override

function resetIv

virtual void resetIv() override

Reimplements: cvedia::rt::iface::Encryption::resetIv

function getIvString

virtual expected< std::string > getIvString() override

Reimplements: cvedia::rt::iface::Encryption::getIvString

function getIvBytes

virtual std::vector< unsigned char > getIvBytes() override

Reimplements: cvedia::rt::iface::Encryption::getIvBytes

function getIvSize

inline virtual size_t getIvSize() override

Reimplements: cvedia::rt::iface::Encryption::getIvSize

function setIvString

virtual expected< void > setIvString(
    std::string const & iv
) override

Reimplements: cvedia::rt::iface::Encryption::setIvString

function setIvBytes

virtual expected< void > setIvBytes(
    std::vector< unsigned char > iv
) override

Reimplements: cvedia::rt::iface::Encryption::setIvBytes

function decryptString

virtual NODISCARD expected< std::string > decryptString(
    std::string const & message
) override

Reimplements: cvedia::rt::iface::Encryption::decryptString

function encryptString

virtual NODISCARD expected< std::string > encryptString(
    std::string const & message
) override

Reimplements: cvedia::rt::iface::Encryption::encryptString

function decryptBytes

virtual NODISCARD expected< std::vector< unsigned char > > decryptBytes(
    std::vector< unsigned char > const & data
) override

Reimplements: cvedia::rt::iface::Encryption::decryptBytes

function encryptBytes

virtual NODISCARD expected< std::vector< unsigned char > > encryptBytes(
    std::vector< unsigned char > const & data
) override

Reimplements: cvedia::rt::iface::Encryption::encryptBytes

function create

static std::unique_ptr< iface::Encryption > create(
    std::string const & password
)

function getBackendAPIUrl

static std::string getBackendAPIUrl()

function getPrivateKey

static expected< RSA * > getPrivateKey()

function pkhEncryptAsset

static NODISCARD expected< EncryptedAsset > pkhEncryptAsset(
    std::vector< unsigned char > const input
)

function pkhDecryptAsset

static NODISCARD expected< std::vector< unsigned char > > pkhDecryptAsset(
    EncryptedAsset asset
)