You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/llarp/encrypted_frame.cpp

31 lines
581 B
C++

#include <llarp/encrypted_frame.hpp>
namespace llarp
{
EncryptedFrame::EncryptedFrame() : m_Buf(nullptr), m_Sz(0)
{
}
EncryptedFrame::EncryptedFrame(const byte_t* buf, size_t sz)
{
m_Sz = sz;
m_Buf = new byte_t[m_Sz];
memcpy(m_Buf, buf, sz);
m_Buffer.base = m_Buf;
m_Buffer.cur = m_Buf;
m_Buffer.sz = sz;
}
EncryptedFrame::~EncryptedFrame()
{
if(m_Buf)
delete[] m_Buf;
}
bool
EncryptedFrame::DecryptInPlace(const byte_t* ourSecretKey,
llarp_crypto* crypto)
{
return false;
}
}