#include <donna128.h>
Definition at line 17 of file donna128.h.
◆ donna128() [1/2]
Botan::donna128::donna128 |
( |
uint64_t | ll = 0, |
|
|
uint64_t | hh = 0 ) |
|
inlineconstexpr |
Definition at line 19 of file donna128.h.
19 {
20 l = ll;
21 h = hh;
22 }
◆ donna128() [2/2]
Botan::donna128::donna128 |
( |
const donna128 & | | ) |
|
|
default |
◆ 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 |
|
inlineconstexpr |
◆ operator&=()
uint64_t Botan::donna128::operator&= |
( |
uint64_t | mask | ) |
|
|
inlineconstexpr |
Definition at line 67 of file donna128.h.
67 {
68 h = 0;
69 l &= mask;
70 return l;
71 }
◆ operator+=() [1/2]
◆ operator+=() [2/2]
donna128 & Botan::donna128::operator+= |
( |
uint64_t | x | ) |
|
|
inlineconstexpr |
◆ operator=()
◆ operator&
friend uint64_t operator& |
( |
const donna128 & | x, |
|
|
uint64_t | mask ) |
|
friend |
◆ operator<<
Definition at line 48 of file donna128.h.
48 {
50 if(shift > 64) {
51 z.h = z.l << (shift - 64);
52 z.l = 0;
53 } else if(shift == 64) {
54 z.h = z.l;
55 z.l = 0;
56 } else if(shift > 0) {
57 const uint64_t
carry = z.l >>
static_cast<size_t>(64 - shift);
58 z.l = (z.l << shift);
59 z.h = (z.h << shift) |
carry;
60 }
61
62 return z;
63 }
constexpr donna128(uint64_t ll=0, uint64_t hh=0)
◆ operator>>
Definition at line 28 of file donna128.h.
28 {
30
31 if(shift > 64) {
32 z.l = z.h >> (shift - 64);
33 z.h = 0;
34 } else if(shift == 64) {
35 z.l = z.h;
36 z.h = 0;
37 } else if(shift > 0) {
38 const uint64_t
carry = z.h <<
static_cast<size_t>(64 - shift);
39 z.h >>= shift;
40 z.l >>= shift;
42 }
43
44 return z;
45 }
The documentation for this class was generated from the following file: