core/crypto/siphash
siphash
Types
1Constants
3BLOCK_SIZE
BLOCK_SIZE :: 8SourceDIGEST_SIZE
DIGEST_SIZE :: 8SourceKEY_SIZE
KEY_SIZE :: 16SourceHigh level API
Procedures
28final
final :: proc(ctx: ^Context, dst: ^u64)Sourceinit
init :: proc(ctx: ^Context, key: []u8, c_rounds: int, d_rounds: int)SourceLow level API
reset
reset :: proc(ctx: ^Context)Sourcesum_bytes
sum_bytes :: proc(msg: []u8, key: []u8) -> (u64)Sourcesum_bytes_1_3
sum_bytes_1_3 :: proc(msg: []u8, key: []u8) -> (u64)Sourcesum_bytes_1_3 will hash the given message with the key and return the computed hash as a u64
sum_bytes_2_4
sum_bytes_2_4 :: proc(msg: []u8, key: []u8) -> (u64)Sourcesum_bytes_2_4 will hash the given message with the key and return the computed hash as a u64
sum_bytes_4_8
sum_bytes_4_8 :: proc(msg: []u8, key: []u8) -> (u64)Sourcesum_bytes_4_8 will hash the given message with the key and return the computed hash as a u64
sum_bytes_to_buffer
sum_bytes_to_buffer :: proc(msg: []u8, key: []u8, dst: []u8)Sourcesum_bytes_to_buffer_1_3
sum_bytes_to_buffer_1_3 :: proc(msg: []u8, key: []u8, dst: []u8)Sourcesum_bytes_to_buffer_1_3 will hash the given message with the key and write the computed hash into the provided destination buffer
sum_bytes_to_buffer_2_4
sum_bytes_to_buffer_2_4 :: proc(msg: []u8, key: []u8, dst: []u8)Sourcesum_bytes_to_buffer_2_4 will hash the given message with the key and write the computed hash into the provided destination buffer
sum_bytes_to_buffer_4_8
sum_bytes_to_buffer_4_8 :: proc(msg: []u8, key: []u8, dst: []u8)Sourcesum_bytes_to_buffer_4_8 will hash the given message with the key and write the computed hash into the provided destination buffer
sum_string
sum_string :: proc(msg: string, key: string) -> (u64)Sourcesum_string_1_3
sum_string_1_3 :: proc(msg: string, key: string) -> (u64)Sourcesum_string_1_3 will hash the given message with the key and return the computed hash as a u64
sum_string_2_4
sum_string_2_4 :: proc(msg: string, key: string) -> (u64)Sourcesum_string_2_4 will hash the given message with the key and return the computed hash as a u64
sum_string_4_8
sum_string_4_8 :: proc(msg: string, key: string) -> (u64)Sourcesum_string_4_8 will hash the given message with the key and return the computed hash as a u64
sum_string_to_buffer
sum_string_to_buffer :: proc(msg: string, key: string, dst: []u8)Sourcesum_string_to_buffer_1_3
sum_string_to_buffer_1_3 :: proc(msg: string, key: string, dst: []u8)Sourcesum_string_to_buffer_1_3 will hash the given message with the key and write the computed hash into the provided destination buffer
sum_string_to_buffer_2_4
sum_string_to_buffer_2_4 :: proc(msg: string, key: string, dst: []u8)Sourcesum_string_to_buffer_2_4 will hash the given message with the key and write the computed hash into the provided destination buffer
sum_string_to_buffer_4_8
sum_string_to_buffer_4_8 :: proc(msg: string, key: string, dst: []u8)Sourcesum_string_to_buffer_4_8 will hash the given message with the key and write the computed hash into the provided destination buffer
update
update :: proc(ctx: ^Context, data: []u8)Sourceverify_bytes
verify_bytes :: proc(tag: []u8, msg: []u8, key: []u8) -> (bool)Sourceverify_bytes_1_3
verify_bytes_1_3 :: proc(tag: []u8, msg: []u8, key: []u8) -> (bool)Sourceverify_bytes will check if the supplied tag matches with the output you will get from the provided message and key
verify_bytes_2_4
verify_bytes_2_4 :: proc(tag: []u8, msg: []u8, key: []u8) -> (bool)Sourceverify_bytes will check if the supplied tag matches with the output you will get from the provided message and key
verify_bytes_4_8
verify_bytes_4_8 :: proc(tag: []u8, msg: []u8, key: []u8) -> (bool)Sourceverify_bytes will check if the supplied tag matches with the output you will get from the provided message and key
verify_u64
verify_u64 :: proc(tag: u64, msg: []u8, key: []u8) -> (bool)Sourceverify_u64_1_3
verify_u64_1_3 :: proc(tag: u64, msg: []u8, key: []u8) -> (bool)Sourceverify_u64_1_3 will check if the supplied tag matches with the output you will get from the provided message and key
verify_u64_2_4
verify_u64_2_4 :: proc(tag: u64, msg: []u8, key: []u8) -> (bool)Sourceverify_u64_2_4 will check if the supplied tag matches with the output you will get from the provided message and key
verify_u64_4_8
verify_u64_4_8 :: proc(tag: u64, msg: []u8, key: []u8) -> (bool)Sourceverify_u64_4_8 will check if the supplied tag matches with the output you will get from the provided message and key
Procedure Groups
8sum
sum :: proc{sum_string, sum_bytes, sum_string_to_buffer, sum_bytes_to_buffer}Sourcesum_1_3
sum_1_3 :: proc{sum_string_1_3, sum_bytes_1_3, sum_string_to_buffer_1_3, sum_bytes_to_buffer_1_3}Sourcesum_2_4
sum_2_4 :: proc{sum_string_2_4, sum_bytes_2_4, sum_string_to_buffer_2_4, sum_bytes_to_buffer_2_4}Sourcesum_4_8
sum_4_8 :: proc{sum_string_4_8, sum_bytes_4_8, sum_string_to_buffer_4_8, sum_bytes_to_buffer_4_8}Sourceverify
verify :: proc{verify_bytes, verify_u64}Sourceverify_1_3
verify_1_3 :: proc{verify_bytes_1_3, verify_u64_1_3}Sourceverify_2_4
verify_2_4 :: proc{verify_bytes_2_4, verify_u64_2_4}Sourceverify_4_8
verify_4_8 :: proc{verify_bytes_4_8, verify_u64_4_8}Source