Assessment reports>Initia>Threat Model>Module base64.move

Module base64.move

Function: to_string

Converts binary data to a Base64-encoded string.

Inputs

Full prototype: public fun to_string(bytes: vector<u8>): String

  • bytes: vector<u8>

    • Validation: None necessary.

    • Impact: The data is converted into a Base64 string.

Function: from_string

Converts a Base64 string into a vector of u8.

Inputs

Full prototype: public fun from_string(str: String): vector<u8>

  • str: String

    • Validation: An error is returned if the underlying library reports an error.

    • Impact: The string is parsed into binary data.

Zellic © 2024Back to top ↑