package core:crypto/sm3

Index

Types (1)
Constants (1)
Variables (1)
Procedure Groups (1)

Types

Sm3_Context ¶

Sm3_Context :: struct {
	state:     [8]u32,
	x:         [64]u8,
	bitlength: u64,
	length:    u64,
}

Constants

DIGEST_SIZE ¶

DIGEST_SIZE :: 32

Variables

IV ¶

IV: [8]u32 = …

Procedures

block ¶

block :: proc "contextless" (ctx: ^Sm3_Context, buf: []u8) {…}

final ¶

final :: proc "odin" (ctx: ^Sm3_Context, data: []u8) {…}

hash_bytes ¶

hash_bytes :: proc "odin" (data: []u8) -> [32]u8 {…}
 

hash_bytes will hash the given input and return the computed hash

hash_bytes_to_buffer ¶

hash_bytes_to_buffer :: proc "odin" (data, hash: []u8) {…}
 

hash_bytes_to_buffer will hash the given input and write the computed hash into the second parameter. It requires that the destination buffer is at least as big as the digest size

hash_file ¶

hash_file :: proc "odin" (hd: os.Handle, load_at_once: bool = false) -> ([32]u8, bool) {…}
 

hash_file will read the file provided by the given handle and compute a hash

hash_stream ¶

hash_stream :: proc "odin" (s: io.Stream) -> ([32]u8, bool) {…}
 

hash_stream will read the stream in chunks and compute a hash from its contents

hash_string ¶

hash_string :: proc "odin" (data: string) -> [32]u8 {…}
 

hash_string will hash the given input and return the computed hash

hash_string_to_buffer ¶

hash_string_to_buffer :: proc "odin" (data: string, hash: []u8) {…}
 

hash_string_to_buffer will hash the given input and assign the computed hash to the second parameter. It requires that the destination buffer is at least as big as the digest size

init ¶

init :: proc "odin" (ctx: ^Sm3_Context) {…}

update ¶

update :: proc "odin" (ctx: ^Sm3_Context, data: []u8) {…}

Procedure Groups

Source Files

Generation Information

Generated with odin version dev-2022-10 (vendor "odin") Windows_amd64 @ 2022-10-05 21:11:47.508100000 +0000 UTC