#include <donna128.h>
Definition at line 17 of file donna128.h.
◆ donna128()
Botan::donna128::donna128 |
( |
uint64_t | l = 0, |
|
|
uint64_t | h = 0 ) |
|
inlineexplicitconstexpr |
◆ hi()
uint64_t Botan::donna128::hi |
( |
| ) |
const |
|
inlineconstexpr |
◆ lo()
uint64_t Botan::donna128::lo |
( |
| ) |
const |
|
inlineconstexpr |
◆ operator uint64_t()
Botan::donna128::operator uint64_t |
( |
| ) |
const |
|
inlineexplicitconstexpr |
Definition at line 87 of file donna128.h.
constexpr uint64_t lo() const
References lo().
◆ operator&=()
uint64_t Botan::donna128::operator&= |
( |
uint64_t | mask | ) |
|
|
inlineconstexpr |
Definition at line 61 of file donna128.h.
61 {
62 m_hi = 0;
63 m_lo &= mask;
64 return m_lo;
65 }
◆ operator+=() [1/2]
◆ operator+=() [2/2]
donna128 & Botan::donna128::operator+= |
( |
uint64_t | x | ) |
|
|
inlineconstexpr |
◆ operator&
friend uint64_t operator& |
( |
const donna128 & | x, |
|
|
uint64_t | mask ) |
|
friend |
◆ operator<<
template<std::unsigned_integral T>
Definition at line 42 of file donna128.h.
42 {
44 if(shift > 64) {
45 z.m_hi = z.m_lo << (shift - 64);
46 z.m_lo = 0;
47 } else if(shift == 64) {
48 z.m_hi = z.m_lo;
49 z.m_lo = 0;
50 } else if(shift > 0) {
51 const uint64_t
carry = z.m_lo >>
static_cast<size_t>(64 - shift);
52 z.m_lo = (z.m_lo << shift);
53 z.m_hi = (z.m_hi << shift) |
carry;
54 }
55
56 return z;
57 }
constexpr donna128(uint64_t l=0, uint64_t h=0)
References Botan::carry(), and donna128().
◆ operator>>
template<std::unsigned_integral T>
Definition at line 22 of file donna128.h.
22 {
24
25 if(shift > 64) {
26 z.m_lo = z.m_hi >> (shift - 64);
27 z.m_hi = 0;
28 } else if(shift == 64) {
29 z.m_lo = z.m_hi;
30 z.m_hi = 0;
31 } else if(shift > 0) {
32 const uint64_t
carry = z.m_hi <<
static_cast<size_t>(64 - shift);
33 z.m_hi >>= shift;
34 z.m_lo >>= shift;
36 }
37
38 return z;
39 }
References Botan::carry(), and donna128().
The documentation for this class was generated from the following file: