#include <donna128.h>
Definition at line 16 of file donna128.h.
◆ donna128() [1/2]
constexpr Botan::donna128::donna128 |
( |
uint64_t | ll = 0, |
|
|
uint64_t | hh = 0 ) |
|
inlineconstexpr |
Definition at line 18 of file donna128.h.
18 {
19 l = ll;
20 h = hh;
21 }
◆ donna128() [2/2]
Botan::donna128::donna128 |
( |
const donna128 & | | ) |
|
|
default |
◆ hi()
constexpr uint64_t Botan::donna128::hi |
( |
| ) |
const |
|
inlineconstexpr |
◆ lo()
constexpr uint64_t Botan::donna128::lo |
( |
| ) |
const |
|
inlineconstexpr |
◆ operator uint64_t()
constexpr Botan::donna128::operator uint64_t |
( |
| ) |
const |
|
inlineconstexpr |
◆ operator&=()
constexpr uint64_t Botan::donna128::operator&= |
( |
uint64_t | mask | ) |
|
|
inlineconstexpr |
Definition at line 66 of file donna128.h.
66 {
67 h = 0;
68 l &= mask;
69 return l;
70 }
◆ operator+=() [1/2]
Definition at line 72 of file donna128.h.
72 {
73 l += x.l;
74 h += x.h;
75
76 const uint64_t
carry = (l < x.l);
78 return *this;
79 }
void carry(int64_t &h0, int64_t &h1)
References Botan::carry().
◆ operator+=() [2/2]
constexpr donna128 & Botan::donna128::operator+= |
( |
uint64_t | x | ) |
|
|
inlineconstexpr |
◆ operator=()
◆ operator&
constexpr friend uint64_t operator& |
( |
const donna128 & | x, |
|
|
uint64_t | mask ) |
|
friend |
◆ operator<<
Definition at line 47 of file donna128.h.
47 {
49 if(shift > 64) {
50 z.h = z.l << (shift - 64);
51 z.l = 0;
52 } else if(shift == 64) {
53 z.h = z.l;
54 z.l = 0;
55 } else if(shift > 0) {
56 const uint64_t
carry = z.l >>
static_cast<size_t>(64 - shift);
57 z.l = (z.l << shift);
58 z.h = (z.h << shift) |
carry;
59 }
60
61 return z;
62 }
constexpr donna128(uint64_t ll=0, uint64_t hh=0)
◆ operator>>
Definition at line 27 of file donna128.h.
27 {
29
30 if(shift > 64) {
31 z.l = z.h >> (shift - 64);
32 z.h = 0;
33 } else if(shift == 64) {
34 z.l = z.h;
35 z.h = 0;
36 } else if(shift > 0) {
37 const uint64_t
carry = z.h <<
static_cast<size_t>(64 - shift);
38 z.h >>= shift;
39 z.l >>= shift;
41 }
42
43 return z;
44 }
The documentation for this class was generated from the following file: