Return to index

sum functions

string = md5sum(string)

top

Returns the MD5 checksum of the input string.

Example:

# Example for md5sum
println md5sum("abc")


struct = s3sum(filename[,blocksize])

top

Returns a struct bearing a checksum (.sum) and an error code (.err) for comparison to an S3 ETag field.

[#SOL]Blocksize specifies the size in bytes of multi-part upload chunks.

[#SOL]When blocksize is 0 then auto-select blocksize and upload checksum type.

[#SOL]When blocksize is -1 then treat as a single-part upload.

[#SOL]Error codes: 0 okay, 1 single-part warning, 2 file error, 3 checksum error

Example:

# Example for s3sum
println s3sum("/tmp/f").sum


string = sha1sum(string)

top

Returns the SHA1 checksum of the input string.

Example:

# Example for sha1sum
println sha1sum("abc")


string = sha224sum(string)

top

Returns the SHA224 checksum of the input string.

Example:

# Example for sha224sum
println sha224sum("abc")


string = sha256sum(string)

top

Returns the SHA256 checksum of the input string.

Example:

# Example for sha256sum
println sha256sum("abc")