Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Functions | Variables
uint256.h File Reference
#include <stdint.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <vector>
+ Include dependency graph for uint256.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  base_uint< BITS >
 Base class without constructors for uint256 and uint160. More...
 
class  uint160
 160-bit unsigned integer More...
 
class  uint256
 256-bit unsigned integer More...
 

Typedefs

typedef base_uint< 160 > base_uint160
 
typedef base_uint< 256 > base_uint256
 

Functions

signed char HexDigit (char c)
 
bool operator== (const uint160 &a, uint64_t b)
 
bool operator!= (const uint160 &a, uint64_t b)
 
const uint160 operator<< (const base_uint160 &a, unsigned int shift)
 
const uint160 operator>> (const base_uint160 &a, unsigned int shift)
 
const uint160 operator<< (const uint160 &a, unsigned int shift)
 
const uint160 operator>> (const uint160 &a, unsigned int shift)
 
const uint160 operator^ (const base_uint160 &a, const base_uint160 &b)
 
const uint160 operator& (const base_uint160 &a, const base_uint160 &b)
 
const uint160 operator| (const base_uint160 &a, const base_uint160 &b)
 
const uint160 operator+ (const base_uint160 &a, const base_uint160 &b)
 
const uint160 operator- (const base_uint160 &a, const base_uint160 &b)
 
bool operator< (const base_uint160 &a, const uint160 &b)
 
bool operator<= (const base_uint160 &a, const uint160 &b)
 
bool operator> (const base_uint160 &a, const uint160 &b)
 
bool operator>= (const base_uint160 &a, const uint160 &b)
 
bool operator== (const base_uint160 &a, const uint160 &b)
 
bool operator!= (const base_uint160 &a, const uint160 &b)
 
const uint160 operator^ (const base_uint160 &a, const uint160 &b)
 
const uint160 operator& (const base_uint160 &a, const uint160 &b)
 
const uint160 operator| (const base_uint160 &a, const uint160 &b)
 
const uint160 operator+ (const base_uint160 &a, const uint160 &b)
 
const uint160 operator- (const base_uint160 &a, const uint160 &b)
 
bool operator< (const uint160 &a, const base_uint160 &b)
 
bool operator<= (const uint160 &a, const base_uint160 &b)
 
bool operator> (const uint160 &a, const base_uint160 &b)
 
bool operator>= (const uint160 &a, const base_uint160 &b)
 
bool operator== (const uint160 &a, const base_uint160 &b)
 
bool operator!= (const uint160 &a, const base_uint160 &b)
 
const uint160 operator^ (const uint160 &a, const base_uint160 &b)
 
const uint160 operator& (const uint160 &a, const base_uint160 &b)
 
const uint160 operator| (const uint160 &a, const base_uint160 &b)
 
const uint160 operator+ (const uint160 &a, const base_uint160 &b)
 
const uint160 operator- (const uint160 &a, const base_uint160 &b)
 
bool operator< (const uint160 &a, const uint160 &b)
 
bool operator<= (const uint160 &a, const uint160 &b)
 
bool operator> (const uint160 &a, const uint160 &b)
 
bool operator>= (const uint160 &a, const uint160 &b)
 
bool operator== (const uint160 &a, const uint160 &b)
 
bool operator!= (const uint160 &a, const uint160 &b)
 
const uint160 operator^ (const uint160 &a, const uint160 &b)
 
const uint160 operator& (const uint160 &a, const uint160 &b)
 
const uint160 operator| (const uint160 &a, const uint160 &b)
 
const uint160 operator+ (const uint160 &a, const uint160 &b)
 
const uint160 operator- (const uint160 &a, const uint160 &b)
 
bool operator== (const uint256 &a, uint64_t b)
 
bool operator!= (const uint256 &a, uint64_t b)
 
const uint256 operator<< (const base_uint256 &a, unsigned int shift)
 
const uint256 operator>> (const base_uint256 &a, unsigned int shift)
 
const uint256 operator<< (const uint256 &a, unsigned int shift)
 
const uint256 operator>> (const uint256 &a, unsigned int shift)
 
const uint256 operator^ (const base_uint256 &a, const base_uint256 &b)
 
const uint256 operator& (const base_uint256 &a, const base_uint256 &b)
 
const uint256 operator| (const base_uint256 &a, const base_uint256 &b)
 
const uint256 operator+ (const base_uint256 &a, const base_uint256 &b)
 
const uint256 operator- (const base_uint256 &a, const base_uint256 &b)
 
bool operator< (const base_uint256 &a, const uint256 &b)
 
bool operator<= (const base_uint256 &a, const uint256 &b)
 
bool operator> (const base_uint256 &a, const uint256 &b)
 
bool operator>= (const base_uint256 &a, const uint256 &b)
 
bool operator== (const base_uint256 &a, const uint256 &b)
 
bool operator!= (const base_uint256 &a, const uint256 &b)
 
const uint256 operator^ (const base_uint256 &a, const uint256 &b)
 
const uint256 operator& (const base_uint256 &a, const uint256 &b)
 
const uint256 operator| (const base_uint256 &a, const uint256 &b)
 
const uint256 operator+ (const base_uint256 &a, const uint256 &b)
 
const uint256 operator- (const base_uint256 &a, const uint256 &b)
 
bool operator< (const uint256 &a, const base_uint256 &b)
 
bool operator<= (const uint256 &a, const base_uint256 &b)
 
bool operator> (const uint256 &a, const base_uint256 &b)
 
bool operator>= (const uint256 &a, const base_uint256 &b)
 
bool operator== (const uint256 &a, const base_uint256 &b)
 
bool operator!= (const uint256 &a, const base_uint256 &b)
 
const uint256 operator^ (const uint256 &a, const base_uint256 &b)
 
const uint256 operator& (const uint256 &a, const base_uint256 &b)
 
const uint256 operator| (const uint256 &a, const base_uint256 &b)
 
const uint256 operator+ (const uint256 &a, const base_uint256 &b)
 
const uint256 operator- (const uint256 &a, const base_uint256 &b)
 
bool operator< (const uint256 &a, const uint256 &b)
 
bool operator<= (const uint256 &a, const uint256 &b)
 
bool operator> (const uint256 &a, const uint256 &b)
 
bool operator>= (const uint256 &a, const uint256 &b)
 
bool operator== (const uint256 &a, const uint256 &b)
 
bool operator!= (const uint256 &a, const uint256 &b)
 
const uint256 operator^ (const uint256 &a, const uint256 &b)
 
const uint256 operator& (const uint256 &a, const uint256 &b)
 
const uint256 operator| (const uint256 &a, const uint256 &b)
 
const uint256 operator+ (const uint256 &a, const uint256 &b)
 
const uint256 operator- (const uint256 &a, const uint256 &b)
 

Variables

const signed char p_util_hexdigit [256]
 

Typedef Documentation

typedef base_uint<160> base_uint160

Definition at line 401 of file uint256.h.

typedef base_uint<256> base_uint256

Definition at line 402 of file uint256.h.

Function Documentation

signed char HexDigit ( char  c)
inline

Definition at line 17 of file uint256.h.

References p_util_hexdigit.

Referenced by IsHex(), ParseHex(), base_uint< BITS >::SetHex(), and CBigNum::SetHex().

+ Here is the caller graph for this function:

bool operator!= ( const uint160 a,
uint64_t  b 
)
inline

Definition at line 475 of file uint256.h.

bool operator!= ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 492 of file uint256.h.

bool operator!= ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 504 of file uint256.h.

bool operator!= ( const uint160 a,
const uint160 b 
)
inline

Definition at line 516 of file uint256.h.

bool operator!= ( const uint256 a,
uint64_t  b 
)
inline

Definition at line 587 of file uint256.h.

bool operator!= ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 604 of file uint256.h.

bool operator!= ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 616 of file uint256.h.

bool operator!= ( const uint256 a,
const uint256 b 
)
inline

Definition at line 628 of file uint256.h.

const uint160 operator& ( const base_uint160 a,
const base_uint160 b 
)
inline

Definition at line 482 of file uint256.h.

const uint160 operator& ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 494 of file uint256.h.

const uint160 operator& ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 506 of file uint256.h.

const uint160 operator& ( const uint160 a,
const uint160 b 
)
inline

Definition at line 518 of file uint256.h.

const uint256 operator& ( const base_uint256 a,
const base_uint256 b 
)
inline

Definition at line 594 of file uint256.h.

const uint256 operator& ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 606 of file uint256.h.

const uint256 operator& ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 618 of file uint256.h.

const uint256 operator& ( const uint256 a,
const uint256 b 
)
inline

Definition at line 630 of file uint256.h.

const uint160 operator+ ( const base_uint160 a,
const base_uint160 b 
)
inline

Definition at line 484 of file uint256.h.

const uint160 operator+ ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 496 of file uint256.h.

const uint160 operator+ ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 508 of file uint256.h.

const uint160 operator+ ( const uint160 a,
const uint160 b 
)
inline

Definition at line 520 of file uint256.h.

const uint256 operator+ ( const base_uint256 a,
const base_uint256 b 
)
inline

Definition at line 596 of file uint256.h.

const uint256 operator+ ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 608 of file uint256.h.

const uint256 operator+ ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 620 of file uint256.h.

const uint256 operator+ ( const uint256 a,
const uint256 b 
)
inline

Definition at line 632 of file uint256.h.

const uint160 operator- ( const base_uint160 a,
const base_uint160 b 
)
inline

Definition at line 485 of file uint256.h.

const uint160 operator- ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 497 of file uint256.h.

const uint160 operator- ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 509 of file uint256.h.

const uint160 operator- ( const uint160 a,
const uint160 b 
)
inline

Definition at line 521 of file uint256.h.

const uint256 operator- ( const base_uint256 a,
const base_uint256 b 
)
inline

Definition at line 597 of file uint256.h.

const uint256 operator- ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 609 of file uint256.h.

const uint256 operator- ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 621 of file uint256.h.

const uint256 operator- ( const uint256 a,
const uint256 b 
)
inline

Definition at line 633 of file uint256.h.

bool operator< ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 487 of file uint256.h.

bool operator< ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 499 of file uint256.h.

bool operator< ( const uint160 a,
const uint160 b 
)
inline

Definition at line 511 of file uint256.h.

bool operator< ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 599 of file uint256.h.

bool operator< ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 611 of file uint256.h.

bool operator< ( const uint256 a,
const uint256 b 
)
inline

Definition at line 623 of file uint256.h.

const uint160 operator<< ( const base_uint160 a,
unsigned int  shift 
)
inline

Definition at line 476 of file uint256.h.

const uint160 operator<< ( const uint160 a,
unsigned int  shift 
)
inline

Definition at line 478 of file uint256.h.

const uint256 operator<< ( const base_uint256 a,
unsigned int  shift 
)
inline

Definition at line 588 of file uint256.h.

const uint256 operator<< ( const uint256 a,
unsigned int  shift 
)
inline

Definition at line 590 of file uint256.h.

bool operator<= ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 488 of file uint256.h.

bool operator<= ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 500 of file uint256.h.

bool operator<= ( const uint160 a,
const uint160 b 
)
inline

Definition at line 512 of file uint256.h.

bool operator<= ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 600 of file uint256.h.

bool operator<= ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 612 of file uint256.h.

bool operator<= ( const uint256 a,
const uint256 b 
)
inline

Definition at line 624 of file uint256.h.

bool operator== ( const uint160 a,
uint64_t  b 
)
inline

Definition at line 474 of file uint256.h.

bool operator== ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 491 of file uint256.h.

bool operator== ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 503 of file uint256.h.

bool operator== ( const uint160 a,
const uint160 b 
)
inline

Definition at line 515 of file uint256.h.

bool operator== ( const uint256 a,
uint64_t  b 
)
inline

Definition at line 586 of file uint256.h.

bool operator== ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 603 of file uint256.h.

bool operator== ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 615 of file uint256.h.

bool operator== ( const uint256 a,
const uint256 b 
)
inline

Definition at line 627 of file uint256.h.

bool operator> ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 489 of file uint256.h.

bool operator> ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 501 of file uint256.h.

bool operator> ( const uint160 a,
const uint160 b 
)
inline

Definition at line 513 of file uint256.h.

bool operator> ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 601 of file uint256.h.

bool operator> ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 613 of file uint256.h.

bool operator> ( const uint256 a,
const uint256 b 
)
inline

Definition at line 625 of file uint256.h.

bool operator>= ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 490 of file uint256.h.

bool operator>= ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 502 of file uint256.h.

bool operator>= ( const uint160 a,
const uint160 b 
)
inline

Definition at line 514 of file uint256.h.

bool operator>= ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 602 of file uint256.h.

bool operator>= ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 614 of file uint256.h.

bool operator>= ( const uint256 a,
const uint256 b 
)
inline

Definition at line 626 of file uint256.h.

const uint160 operator>> ( const base_uint160 a,
unsigned int  shift 
)
inline

Definition at line 477 of file uint256.h.

const uint160 operator>> ( const uint160 a,
unsigned int  shift 
)
inline

Definition at line 479 of file uint256.h.

const uint256 operator>> ( const base_uint256 a,
unsigned int  shift 
)
inline

Definition at line 589 of file uint256.h.

const uint256 operator>> ( const uint256 a,
unsigned int  shift 
)
inline

Definition at line 591 of file uint256.h.

const uint160 operator^ ( const base_uint160 a,
const base_uint160 b 
)
inline

Definition at line 481 of file uint256.h.

const uint160 operator^ ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 493 of file uint256.h.

const uint160 operator^ ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 505 of file uint256.h.

const uint160 operator^ ( const uint160 a,
const uint160 b 
)
inline

Definition at line 517 of file uint256.h.

const uint256 operator^ ( const base_uint256 a,
const base_uint256 b 
)
inline

Definition at line 593 of file uint256.h.

const uint256 operator^ ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 605 of file uint256.h.

const uint256 operator^ ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 617 of file uint256.h.

const uint256 operator^ ( const uint256 a,
const uint256 b 
)
inline

Definition at line 629 of file uint256.h.

const uint160 operator| ( const base_uint160 a,
const base_uint160 b 
)
inline

Definition at line 483 of file uint256.h.

const uint160 operator| ( const base_uint160 a,
const uint160 b 
)
inline

Definition at line 495 of file uint256.h.

const uint160 operator| ( const uint160 a,
const base_uint160 b 
)
inline

Definition at line 507 of file uint256.h.

const uint160 operator| ( const uint160 a,
const uint160 b 
)
inline

Definition at line 519 of file uint256.h.

const uint256 operator| ( const base_uint256 a,
const base_uint256 b 
)
inline

Definition at line 595 of file uint256.h.

const uint256 operator| ( const base_uint256 a,
const uint256 b 
)
inline

Definition at line 607 of file uint256.h.

const uint256 operator| ( const uint256 a,
const base_uint256 b 
)
inline

Definition at line 619 of file uint256.h.

const uint256 operator| ( const uint256 a,
const uint256 b 
)
inline

Definition at line 631 of file uint256.h.

Variable Documentation

const signed char p_util_hexdigit[256]

Definition at line 391 of file util.cpp.

Referenced by HexDigit().