hash/ md5.bi

Summary
hash/ md5.bi
LicenseCopyright © 2009, FreeBASIC Extended Library Development Group
ext. hashes.md5
High Level API
Functions
checksum
checksum
checksum
Low Level API
Types
StateRepresents the internal state needed by the low level md5 functions.
Functions
initInitializes a MD5 state to a known good value.
appendAdds the checksum of the data passed to the current state.
finishApply last minute values to the state passed and return the checksum.

License

Copyright © 2009, FreeBASIC Extended Library Development Group

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License

ext. hashes.md5

Summary
High Level API
Functions
checksum
checksum
checksum
Low Level API
Types
StateRepresents the internal state needed by the low level md5 functions.
Functions
initInitializes a MD5 state to a known good value.
appendAdds the checksum of the data passed to the current state.
finishApply last minute values to the state passed and return the checksum.

High Level API

Functions

checksum

declare function checksum overload (byref x as string) as string

Parameters

xstring containing the data you wish to retrieve the checksum of.

checksum

declare function checksum (byref x as ext.File,  
byval blocksize as uinteger =  1048576) as string

Parameters

xFile containing the data you wish to retrieve the checksum of.
blocksize(Optional) size of data to read from disk.

checksum

declare function checksum (byval x as any ptr,
byval nbytes as uinteger) as string

Parameters

xpointer containing the data you wish to retrieve the checksum of.
nbytesthe number of bytes that can be read from x.

Low Level API

Types

State

Represents the internal state needed by the low level md5 functions.

See Also

init append finish

Functions

init

declare sub init(byval pms as state ptr)

Initializes a MD5 state to a known good value.

Parameters

pmspointer to state to initialize.

append

declare sub append(byval pms as state ptr,
byval data_ as const ubyte ptr,
byval nbytes as integer)

Adds the checksum of the data passed to the current state.

Parameters

pmspointer to the state.
data_const ptr to the data to checksum
nbytesthe number of bytes available in data_

finish

declare function finish (byval pms as state ptr) as string

Apply last minute values to the state passed and return the checksum.

declare function checksum overload (byref x as string) as string
declare sub init(byval pms as state ptr)
Initializes a MD5 state to a known good value.
declare sub append(byval pms as state ptr,
byval data_ as const ubyte ptr,
byval nbytes as integer)
Adds the checksum of the data passed to the current state.
declare function finish (byval pms as state ptr) as string
Apply last minute values to the state passed and return the checksum.
Manages a connection to a disk file.