Skip to main content

encode_component

Function encode_component 

Source
pub fn encode_component(
    mtype: MainType,
    stype: SubType,
    version: Version,
    bit_length: u32,
    digest: &[u8],
) -> IsccResult<String>
Expand description

Encode an ISCC-UNIT with header and body as a base32 string.

Produces the base32-encoded string (without “ISCC:” prefix). Callers add the prefix when constructing the final ISCC string.

Note: ISCC-CODEs (MainType::Iscc) are not encoded via this function — gen_iscc_code_v0 constructs the composite header directly.