SHA256 How to get digest value in `unsigned char` format?
#9
Oups!
the code is then

Code:
const u32 digest32[8] = { ctx0.h[0], ctx0.h[1], ctx0.h[2], ctx0.h[3], ctx0.h[4], ctx0.h[5], ctx0.h[6], ctx0.h[7] }    
u8 digest8[32];

for (unsigned int i = 0; i < 8; i++)
{
    v.v32 = digest32[i];
    digest8[i * 4] = v.v8a;
    digest8[i * 4 + 1] = v.v8b;
    digest8[i * 4 + 2] = v.v8c;
    digest8[i * 4 + 3] = v.v8d;
}
Reply


Messages In This Thread
RE: SHA256 How to get digest value in `unsigned char` format? - by LeMoussel - 04-01-2019, 08:47 AM