Bitcoin Core 29.99.0
P2P Digital Currency
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Obfuscation Class Reference

#include <obfuscation.h>

Public Types

using KeyType = uint64_t
 

Public Member Functions

 Obfuscation ()
 
 Obfuscation (std::span< const std::byte, KEY_SIZE > key_bytes)
 
 operator bool () const
 
void operator() (std::span< std::byte > target, size_t key_offset=0) const
 
template<typename Stream >
void Serialize (Stream &s) const
 
template<typename Stream >
void Unserialize (Stream &s)
 
std::string HexKey () const
 

Static Public Attributes

static constexpr size_t KEY_SIZE {sizeof(KeyType)}
 

Private Member Functions

void SetRotations (KeyType key)
 

Static Private Member Functions

static KeyType ToKey (std::span< const std::byte, KEY_SIZE > key_span)
 
static void XorWord (std::span< std::byte > target, KeyType key)
 

Private Attributes

std::array< KeyType, KEY_SIZEm_rotations
 

Detailed Description

Definition at line 19 of file obfuscation.h.

Member Typedef Documentation

◆ KeyType

using Obfuscation::KeyType = uint64_t

Definition at line 22 of file obfuscation.h.

Constructor & Destructor Documentation

◆ Obfuscation() [1/2]

Obfuscation::Obfuscation ( )
inline

Definition at line 25 of file obfuscation.h.

Here is the call graph for this function:

◆ Obfuscation() [2/2]

Obfuscation::Obfuscation ( std::span< const std::byte, KEY_SIZE key_bytes)
inlineexplicit

Definition at line 26 of file obfuscation.h.

Here is the call graph for this function:

Member Function Documentation

◆ HexKey()

std::string Obfuscation::HexKey ( ) const
inline

Definition at line 79 of file obfuscation.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator bool()

Obfuscation::operator bool ( ) const
inline

Definition at line 31 of file obfuscation.h.

◆ operator()()

void Obfuscation::operator() ( std::span< std::byte >  target,
size_t  key_offset = 0 
) const
inline

Definition at line 33 of file obfuscation.h.

Here is the call graph for this function:

◆ Serialize()

template<typename Stream >
void Obfuscation::Serialize ( Stream &  s) const
inline

Definition at line 62 of file obfuscation.h.

◆ SetRotations()

void Obfuscation::SetRotations ( KeyType  key)
inlineprivate

Definition at line 88 of file obfuscation.h.

Here is the caller graph for this function:

◆ ToKey()

static KeyType Obfuscation::ToKey ( std::span< const std::byte, KEY_SIZE key_span)
inlinestaticprivate

Definition at line 97 of file obfuscation.h.

Here is the caller graph for this function:

◆ Unserialize()

template<typename Stream >
void Obfuscation::Unserialize ( Stream &  s)
inline

Definition at line 71 of file obfuscation.h.

Here is the call graph for this function:

◆ XorWord()

static void Obfuscation::XorWord ( std::span< std::byte >  target,
KeyType  key 
)
inlinestaticprivate

Definition at line 104 of file obfuscation.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ KEY_SIZE

constexpr size_t Obfuscation::KEY_SIZE {sizeof(KeyType)}
staticconstexpr

Definition at line 23 of file obfuscation.h.

◆ m_rotations

std::array<KeyType, KEY_SIZE> Obfuscation::m_rotations
private

Definition at line 86 of file obfuscation.h.


The documentation for this class was generated from the following file: