Class: Toybox.Cryptography.Hash

Overview

Compute the Hash digest of a message.

See Also:

Since:

API Level 3.0.0

Supported Devices:

Instance Method Summary collapse

Instance Method Details

digest() as Lang.ByteArray

Get the current digest of the message that has been hashed.

Note:

This method resets the state of the Hash object, which can be used to compute a new hash

Returns:

Since:

API Level 3.0.0

initialize(options as { :algorithm as Cryptography.HashAlgorithm })

Constructor

Parameters:

  • options(Lang.Dictionary)

    A Dictionary of options

    • :algorithm(Lang.Number)

      The type of Hash this object will compute from the HASH_* enumeration (required)

See Also:

Since:

API Level 3.0.0

Throws:

update(message as Lang.ByteArray) as Void

Continue hashing of a message by consuming the next chunk of data.

Repeated calls are equivalent to a single call with the concatenation of all the arguments.

Parameters:

  • message(Lang.ByteArray)

    The next chunk of the message being hashed

Since:

API Level 3.0.0


Generated Apr 17, 2024 9:40:37 AM