Sese Framework  x.y.z
A cross-platform framework
载入中...
搜索中...
未找到
SHA256Util.cpp 文件参考
#include <sese/convert/SHA256Util.h>
#include <sese/io/ByteBuilder.h>
#include <sese/util/Endian.h>
#include <bitset>

struct  sese::Bitset32
 endian 无关的 32 位 更多...
 

宏定义

#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0000'0011) << 6 | (bt2 & 0b1111'1100) >> 2
 
#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0011'1111) << 2 | (bt2 & 0b1100'0000) >> 6
 
#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0111'1111) << 1 | (bt2 & 0b1000'0000) >> 7
 
#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0000'0111) << 5 | (bt2 & 0b1111'1000) >> 3
 
#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0001'1111) << 3 | (bt2 & 0b1110'0000) >> 5
 
#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0000'0001) << 7 | (bt2 & 0b1111'1110) >> 1
 
#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0000'0011) << 6 | (bt2 & 0b1111'1100) >> 2
 
#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0000'0111) << 5 | (bt2 & 0b1111'1000) >> 3
 
#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0011'1111) << 2 | (bt2 & 0b1100'0000) >> 6
 
#define XX(value, bt1, bt2)   uint8_t value = (bt1 & 0b0000'0001) << 7 | (bt2 & 0b1111'1110) >> 1
 
#define XX(i)   value[i] = value[i] + h[i]
 
#define a   value[0]
 
#define b   value[1]
 
#define c   value[2]
 
#define d   value[3]
 
#define e   value[4]
 
#define f   value[5]
 
#define g   value[6]
 
#define h   value[7]
 

函数

char toChar (unsigned char ch, bool is_cap)
 

宏定义说明

◆ a

◆ b

◆ c

◆ d

◆ e

◆ f

◆ g

#define g   value[6]

◆ h

#define h   value[7]

◆ XX [1/11]

#define XX ( i)    value[i] = value[i] + h[i]

◆ XX [2/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0000'0011) << 6 | (bt2 & 0b1111'1100) >> 2

◆ XX [3/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0011'1111) << 2 | (bt2 & 0b1100'0000) >> 6

◆ XX [4/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0111'1111) << 1 | (bt2 & 0b1000'0000) >> 7

◆ XX [5/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0000'0111) << 5 | (bt2 & 0b1111'1000) >> 3

◆ XX [6/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0001'1111) << 3 | (bt2 & 0b1110'0000) >> 5

◆ XX [7/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0000'0001) << 7 | (bt2 & 0b1111'1110) >> 1

◆ XX [8/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0000'0011) << 6 | (bt2 & 0b1111'1100) >> 2

◆ XX [9/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0000'0111) << 5 | (bt2 & 0b1111'1000) >> 3

◆ XX [10/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0011'1111) << 2 | (bt2 & 0b1100'0000) >> 6

◆ XX [11/11]

#define XX ( value,
bt1,
bt2 )   uint8_t value = (bt1 & 0b0000'0001) << 7 | (bt2 & 0b1111'1110) >> 1

函数说明

◆ toChar()

char toChar ( unsigned char ch,
bool is_cap )
inline

被这些函数引用 sese::SHA256Util::encode().