plebble
double_sha256.h
Go to the documentation of this file.
1 /*
2 -------------------------------------------------------------------------------
3  PLEBBLE
4 -------------------------------------------------------------------------------
5  Copyright (C) 2019-2020 KATLAS Technology. (http://katlastechnology.com)
6  Copyright (C) 2017-2020 Marcos Mayorga. (mm@mm-studios.com)
7 
8  This file is part of our Plebble(R) Platform.
9 
10  The code below cannot be copied, used for any purpose other than the one
11  agreed and/or distributed without the express permission of
12  KATLAS Technology.
13 -------------------------------------------------------------------------------
14 
15 
16 */
17 #ifndef USGOV_7f56782e8ba6adc1469f36dc752c8f1d9729121ed3ab14b7f4b336757ba0af2c
18 #define USGOV_7f56782e8ba6adc1469f36dc752c8f1d9729121ed3ab14b7f4b336757ba0af2c
19 
20 #include <stdint.h>
21 #include <stdlib.h>
22 #include <string>
23 #include <cassert>
24 #include <cstring>
25 #include <us/gov/likely.h>
26 #include "sha256.h"
27 #include "ripemd160.h"
28 
29 namespace us { namespace gov {
30 namespace crypto {
31 using namespace std;
32 
33  class double_sha256 {
34  private:
36  public:
38  static const size_t output_size = sha256::output_size;
39  void finalize(unsigned char hash[output_size]);
40  void finalize(value_type& hash);
41  void write(const unsigned char *data, size_t len);
42  void write(const string&data);
43  void write(const value_type& data);
44  void write(const ripemd160::value_type& data);
45  void write(bool);
46  void reset();
47 
48  };
49 
50 }
51 }}
52 
53 #endif
us::gov::crypto::double_sha256
Definition: double_sha256.h:33
endian_rw.h
us::gov::crypto::double_sha256::write
void write(const value_type &data)
double_sha256.h
us
Definition: daemon.h:22
us::gov::crypto::ripemd160::value_type
Definition: ripemd160.h:38
unlikely
#define unlikely(x)
Definition: likely.h:30
us::gov::crypto::sha256::value_type
Definition: sha256.h:38
likely.h
us::gov::crypto::double_sha256::finalize
void finalize(value_type &hash)
us::gov::crypto::sha256::output_size
static constexpr uint32_t output_size
Definition: sha256.h:35
c
us::gov::crypto::double_sha256 c
Definition: double_sha256.cpp:26
us::gov::crypto::double_sha256::reset
void reset()
us::gov::crypto::sha256
Definition: sha256.h:33
us::gov::crypto::ripemd160::output_size
static constexpr size_t output_size
Definition: ripemd160.h:36
us::gov::crypto::double_sha256::finalize
void finalize(unsigned char hash[output_size])
ripemd160.h
sha256.h
us::gov::crypto::double_sha256::sha
sha256 sha
Definition: double_sha256.h:35
likely
#define likely(x)
Definition: likely.h:29
std
Definition: app.h:380
us::gov::crypto::double_sha256::write
void write(bool)
us::gov::crypto::double_sha256::value_type
sha256::value_type value_type
Definition: double_sha256.h:37
us::gov::crypto::double_sha256::write
void write(const string &data)
us::gov::crypto::double_sha256::write
void write(const ripemd160::value_type &data)
base58.h
us::gov::crypto
Definition: base58.cpp:19
us::gov::crypto::double_sha256::write
void write(const unsigned char *data, size_t len)