package core:crypto/legacy/md5

⌘K
Ctrl+K
or
/

    Overview

    package md5 implements the MD5 hash algorithm.

    WARNING: The MD5 algorithm is known to be insecure and should only be used for interoperating with legacy applications.

    See: https://eprint.iacr.org/2005/075 https://datatracker.ietf.org/doc/html/rfc1321

    Index

    Types (1)
    Constants (2)
    Variables (0)

    This section is empty.

    Procedures (5)
    Procedure Groups (0)

    This section is empty.

    Types

    Context ¶

    Context :: struct {
    	data:           [64]u8,
    	state:          [4]u32,
    	bitlen:         u64,
    	datalen:        u32,
    	is_initialized: bool,
    }
     

    Context is a MD5 instance.

    Related Procedures With Parameters

    Constants

    BLOCK_SIZE ¶

    BLOCK_SIZE :: 64
     

    BLOCK_SIZE is the MD5 block size in bytes.

    DIGEST_SIZE ¶

    DIGEST_SIZE :: 16
     

    DIGEST_SIZE is the MD5 digest size in bytes.

    Variables

    This section is empty.

    Procedures

    clone ¶

    clone :: proc(ctx, other: ^$T) {…}
     

    clone clones the Context other into ctx.

    final ¶

    final :: proc(ctx: ^Context, hash: []u8, finalize_clone: bool = false) {…}
     

    final finalizes the Context, writes the digest to hash, and calls reset on the Context.

    Iff finalize_clone is set, final will work on a copy of the Context, which is useful for for calculating rolling digests.

    init ¶

    init :: proc(ctx: ^Context) {…}
     

    init initializes a Context.

    reset ¶

    reset :: proc(ctx: ^$T) {…}
     

    reset sanitizes the Context. The Context must be re-initialized to be used again.

    update ¶

    update :: proc(ctx: ^Context, data: []u8) {…}
     

    update adds more data to the Context.

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2024-04 (vendor "odin") Windows_amd64 @ 2024-04-23 21:09:30.025614400 +0000 UTC