Go to the source code of this file.
|
void | shakeHash (const int hashAlgorithm, const char *message, int outHashLength, char *outHash) |
| SHAKE 可變長度雜湊函數
|
|
void | shakeMCTHash (const int hashAlgorithm, const char *initialSeedString, int maxOutBitLength, int minOutBitLength) |
| SHAKE 可變長度雜湊函數的Monte Carlo Test.
|
|
◆ shakeHash()
void shakeHash |
( |
const int | hashAlgorithm, |
|
|
const char * | message, |
|
|
int | outHashLength, |
|
|
char * | outHash ) |
SHAKE 可變長度雜湊函數
SHAKE 可變長度雜湊函數
此函式的輸入為雜湊演算法、訊息、雜湊值長度
此函式的輸出為雜湊值
使用範例:
char* message = "4169C84E8FF3C9B66961646CF18D5654";
char output[(3152/8)*2+1];
int outLen = 3152;
printf("output: %s\n", output);
const int SHAKE_128
Definition myShake.c:9
void shakeHash(const int hashAlgorithm, const char *message, int outHashLength, char *outHash)
SHAKE 可變長度雜湊函數
Definition myShake.c:14
- Parameters
-
hashAlgorithm | 使用的雜湊演算法: SHAKE_128, SHAKE_256 |
message | 要雜湊的訊息 |
outHashLength | 希望輸出的雜湊值長度 (bits) |
outHash | 輸出的雜湊值 (利用指標回傳) |
◆ shakeMCTHash()
void shakeMCTHash |
( |
const int | hashAlgorithm, |
|
|
const char * | initialSeedString, |
|
|
int | maxOutBitLength, |
|
|
int | minOutBitLength ) |
SHAKE 可變長度雜湊函數的Monte Carlo Test.
SHAKE 可變長度雜湊函數的Monte Carlo Test
此函式的輸入為雜湊演算法、初始種子字串、最大輸出長度、最小輸出長度
使用範例:
char* message = "B1C0D66C55B27FA3D627939AB6C54619";
int maxLen = 51200;
int minLen = 16;
const int SHAKE_256
Definition myShake.c:10
void shakeMCTHash(const int hashAlgorithm, const char *initialSeedString, int maxOutBitLength, int minOutBitLength)
SHAKE 可變長度雜湊函數的Monte Carlo Test.
Definition myShake.c:75
- Parameters
-
hashAlgorithm | 使用的雜湊演算法: SHAKE_128, SHAKE_256 |
initialSeedString | 初始種子字串 |
maxOutBitLength | 最大輸出長度 (MCT測試所需) |
minOutBitLength | 最小輸出長度 (MCT測試所需) |
◆ SHAKE_128
◆ SHAKE_256