---
title: llarp::EncryptedFrame

---

# llarp::EncryptedFrame





Inherits from [llarp::Encrypted< EncryptedFrameSize >](Classes/structllarp_1_1Encrypted.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[EncryptedFrame](Classes/structllarp_1_1EncryptedFrame.md#function-encryptedframe)**() |
| | **[EncryptedFrame](Classes/structllarp_1_1EncryptedFrame.md#function-encryptedframe)**(size_t sz) |
| void | **[Resize](Classes/structllarp_1_1EncryptedFrame.md#function-resize)**(size_t sz) |
| bool | **[DoEncrypt](Classes/structllarp_1_1EncryptedFrame.md#function-doencrypt)**(const [SharedSecret](Classes/structllarp_1_1AlignedBuffer.md) & shared, bool noDH =false) |
| bool | **[DecryptInPlace](Classes/structllarp_1_1EncryptedFrame.md#function-decryptinplace)**(const [SecretKey](Classes/structllarp_1_1SecretKey.md) & seckey) |
| bool | **[DoDecrypt](Classes/structllarp_1_1EncryptedFrame.md#function-dodecrypt)**(const [SharedSecret](Classes/structllarp_1_1AlignedBuffer.md) & shared) |
| bool | **[EncryptInPlace](Classes/structllarp_1_1EncryptedFrame.md#function-encryptinplace)**(const [SecretKey](Classes/structllarp_1_1SecretKey.md) & seckey, const [PubKey](Classes/structllarp_1_1PubKey.md) & other) |

## Additional inherited members

**Public Functions inherited from [llarp::Encrypted< EncryptedFrameSize >](Classes/structllarp_1_1Encrypted.md)**

|                | Name           |
| -------------- | -------------- |
| | **[Encrypted](Classes/structllarp_1_1Encrypted.md#function-encrypted)**([Encrypted](Classes/structllarp_1_1Encrypted.md) && other) |
| | **[Encrypted](Classes/structllarp_1_1Encrypted.md#function-encrypted)**(const [Encrypted](Classes/structllarp_1_1Encrypted.md) & other) |
| | **[Encrypted](Classes/structllarp_1_1Encrypted.md#function-encrypted)**() |
| void | **[Clear](Classes/structllarp_1_1Encrypted.md#function-clear)**() |
| | **[Encrypted](Classes/structllarp_1_1Encrypted.md#function-encrypted)**(const byte_t * buf, size_t sz) |
| | **[Encrypted](Classes/structllarp_1_1Encrypted.md#function-encrypted)**(size_t sz) |
| bool | **[BEncode](Classes/structllarp_1_1Encrypted.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) const |
| bool | **[operator==](Classes/structllarp_1_1Encrypted.md#function-operator==)**(const [Encrypted](Classes/structllarp_1_1Encrypted.md) & other) const |
| bool | **[operator!=](Classes/structllarp_1_1Encrypted.md#function-operator!=)**(const [Encrypted](Classes/structllarp_1_1Encrypted.md) & other) const |
| [Encrypted](Classes/structllarp_1_1Encrypted.md) & | **[operator=](Classes/structllarp_1_1Encrypted.md#function-operator=)**(const [Encrypted](Classes/structllarp_1_1Encrypted.md) & other) |
| [Encrypted](Classes/structllarp_1_1Encrypted.md) & | **[operator=](Classes/structllarp_1_1Encrypted.md#function-operator=)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & buf) |
| void | **[Fill](Classes/structllarp_1_1Encrypted.md#function-fill)**(byte_t fill) |
| void | **[Randomize](Classes/structllarp_1_1Encrypted.md#function-randomize)**() |
| bool | **[BDecode](Classes/structllarp_1_1Encrypted.md#function-bdecode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) |
| [llarp_buffer_t](Classes/structllarp__buffer__t.md) * | **[Buffer](Classes/structllarp_1_1Encrypted.md#function-buffer)**() |
| size_t | **[size](Classes/structllarp_1_1Encrypted.md#function-size)**() |
| size_t | **[size](Classes/structllarp_1_1Encrypted.md#function-size)**() const |
| byte_t * | **[data](Classes/structllarp_1_1Encrypted.md#function-data)**() |
| const byte_t * | **[data](Classes/structllarp_1_1Encrypted.md#function-data)**() const |

**Protected Functions inherited from [llarp::Encrypted< EncryptedFrameSize >](Classes/structllarp_1_1Encrypted.md)**

|                | Name           |
| -------------- | -------------- |
| void | **[UpdateBuffer](Classes/structllarp_1_1Encrypted.md#function-updatebuffer)**() |

**Protected Attributes inherited from [llarp::Encrypted< EncryptedFrameSize >](Classes/structllarp_1_1Encrypted.md)**

|                | Name           |
| -------------- | -------------- |
| [AlignedBuffer](Classes/structllarp_1_1AlignedBuffer.md)< bufsz > | **[_buf](Classes/structllarp_1_1Encrypted.md#variable--buf)**  |
| size_t | **[_sz](Classes/structllarp_1_1Encrypted.md#variable--sz)**  |
| [llarp_buffer_t](Classes/structllarp__buffer__t.md) | **[m_Buffer](Classes/structllarp_1_1Encrypted.md#variable-m-buffer)**  |


## Public Functions Documentation

### function EncryptedFrame

```cpp
inline EncryptedFrame()
```


### function EncryptedFrame

```cpp
inline EncryptedFrame(
    size_t sz
)
```


### function Resize

```cpp
inline void Resize(
    size_t sz
)
```


### function DoEncrypt

```cpp
bool DoEncrypt(
    const SharedSecret & shared,
    bool noDH =false
)
```


### function DecryptInPlace

```cpp
bool DecryptInPlace(
    const SecretKey & seckey
)
```


### function DoDecrypt

```cpp
bool DoDecrypt(
    const SharedSecret & shared
)
```


### function EncryptInPlace

```cpp
bool EncryptInPlace(
    const SecretKey & seckey,
    const PubKey & other
)
```


-------------------------------

Updated on 2023-01-30 at 17:55:37 +0000