---
title: llarp::Encrypted
summary: encrypted buffer base type 

---

# llarp::Encrypted



encrypted buffer base type  [More...](#detailed-description)


`#include <encrypted.hpp>`

## Public Functions

|                | 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

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

## Protected Attributes

|                | 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)**  |

## Detailed Description

```cpp
template <size_t bufsz =MAX_LINK_MSG_SIZE>
struct llarp::Encrypted;
```

encrypted buffer base type 
## Public Functions Documentation

### function Encrypted

```cpp
inline Encrypted(
    Encrypted && other
)
```


### function Encrypted

```cpp
inline Encrypted(
    const Encrypted & other
)
```


### function Encrypted

```cpp
inline Encrypted()
```


### function Clear

```cpp
inline void Clear()
```


### function Encrypted

```cpp
inline Encrypted(
    const byte_t * buf,
    size_t sz
)
```


### function Encrypted

```cpp
inline Encrypted(
    size_t sz
)
```


### function BEncode

```cpp
inline bool BEncode(
    llarp_buffer_t * buf
) const
```


### function operator==

```cpp
inline bool operator==(
    const Encrypted & other
) const
```


### function operator!=

```cpp
inline bool operator!=(
    const Encrypted & other
) const
```


### function operator=

```cpp
inline Encrypted & operator=(
    const Encrypted & other
)
```


### function operator=

```cpp
inline Encrypted & operator=(
    const llarp_buffer_t & buf
)
```


### function Fill

```cpp
inline void Fill(
    byte_t fill
)
```


### function Randomize

```cpp
inline void Randomize()
```


### function BDecode

```cpp
inline bool BDecode(
    llarp_buffer_t * buf
)
```


### function Buffer

```cpp
inline llarp_buffer_t * Buffer()
```


### function size

```cpp
inline size_t size()
```


### function size

```cpp
inline size_t size() const
```


### function data

```cpp
inline byte_t * data()
```


### function data

```cpp
inline const byte_t * data() const
```


## Protected Functions Documentation

### function UpdateBuffer

```cpp
inline void UpdateBuffer()
```


## Protected Attributes Documentation

### variable _buf

```cpp
AlignedBuffer< bufsz > _buf;
```


### variable _sz

```cpp
size_t _sz;
```


### variable m_Buffer

```cpp
llarp_buffer_t m_Buffer;
```


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

Updated on 2023-01-06 at 19:35:05 +0000