问题描述:相同的输入,每次计算摘要却不相同 算法:blake2b 目的:计算输入的checksum(我只想要4字节) 主要代码(c语言): unsigned char arr[] = {3,138,126,22,34,2,177,53,213,232,134,56,45,198,89,8,93,248,173,85,43,84,50,1,114,88,4,139,46,37,252,132,107,203,86,157,135,96,194,73, 148,74,178,207,145,195,95,50,124}; blake2b_state stat = {}; unsigned char out = (unsigned char)malloc(64); memset(out, 0, 64); // 计算过程如下三步 blake2b_init(&stat, 4); blake2b_update(&stat, (const uint8_t*)arr, strlen(arr)); blake2b_final(&stat, out, 4); 运行截图: