add sdf and skf

This commit is contained in:
Zhi Guan
2021-08-03 17:09:35 +08:00
parent d6feba3749
commit a57193836b
71 changed files with 11100 additions and 765 deletions

View File

@@ -49,7 +49,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <gmssl/sm3.h>
@@ -69,7 +68,7 @@ int main(int argc, char **argv)
}
sm3_init(&ctx);
while ((len = read(STDIN_FILENO, buf, sizeof(buf))) > 0) {
while ((len = fread(buf, 1, sizeof(buf), stdin)) > 0) {
sm3_update(&ctx, buf, len);
}
sm3_finish(&ctx, dgst);