Displaying 2 results from an estimated 2 matches for "md_init_fn".
Did you mean:
__init_fn
2024 Aug 06
1
[PATCH] Add SM3 secure hash algorithm
...c
+++ b/digest-libc.c
@@ -46,6 +46,7 @@
#define SHA512_BLOCK_LENGTH SHA512_HMAC_BLOCK_SIZE
#endif
+#include "sm3.h"
#include "ssherr.h"
#include "sshbuf.h"
#include "digest.h"
@@ -121,6 +122,16 @@ const struct ssh_digest digests[SSH_DIGEST_MAX] = {
(md_init_fn *) SHA512Init,
(md_update_fn *) SHA512Update,
(md_final_fn *) SHA512Final
+ },
+ {
+ SSH_DIGEST_SM3,
+ "SM3",
+ SM3_BLOCK_LENGTH,
+ SM3_DIGEST_LENGTH,
+ sizeof(SM3_CTX),
+ (md_init_fn *) SM3Init,
+ (md_update_fn *) SM3Update,
+ (md_final_fn *) SM3Final
}
};
diff --git a...
2024 Aug 07
1
[PATCH] Add SM3 secure hash algorithm
...#define SHA512_BLOCK_LENGTH SHA512_HMAC_BLOCK_SIZE
> #endif
>
> +#include "sm3.h"
> #include "ssherr.h"
> #include "sshbuf.h"
> #include "digest.h"
> @@ -121,6 +122,16 @@ const struct ssh_digest digests[SSH_DIGEST_MAX] = {
> (md_init_fn *) SHA512Init,
> (md_update_fn *) SHA512Update,
> (md_final_fn *) SHA512Final
> + },
> + {
> + SSH_DIGEST_SM3,
> + "SM3",
> + SM3_BLOCK_LENGTH,
> + SM3_DIGEST_LENGTH,
> + sizeof(SM3_CTX),
> + (md_init_fn *) SM3Init,
> + (md_update_fn *) SM3Upd...