Platforms to show: All Mac Windows Linux Cross-Platform

Back to MD5DigestMBS class.

MD5DigestMBS.HashFile(file as FolderItem, Hex as boolean = true) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Encryption and Hash MBS Encryption Plugin 14.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates hash from whole file.

Plugin will start a preemptive thread to read in file and process all data in chunks.
Returns hash on success or empty string on failure. May raise OutOfMemoryException or IOException.
This function works best if called from a thread.
If hex is true, the result is encoded as hex string.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
If you run several threads calling MT methods, you can get all CPU cores busy while main thread shows GUI with progress window.

MD5DigestMBS.HMAC(key as string, data as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Encryption and Hash MBS Encryption Plugin 13.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the a specific HASH based on the key and the data string.

MD5DigestMBS.MD5(data as memoryblock) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Encryption and Hash MBS Encryption Plugin 12.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the MD5 message digest value of a string.

See also:

MD5DigestMBS.MD5(data as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Encryption and Hash MBS Encryption Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the MD5 message digest value of a string.
Example
// Compare RB5 MD5 to the one from MBS

dim a,b as String

a=MD5("Hallo")

b=MD5DigestMBS.MD5("Hallo")

msgbox str(StrComp(a,b,0))

Same as the MD5 function in RB5.

See also:

MD5DigestMBS.MD5String(data as memoryblock) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Encryption and Hash MBS Encryption Plugin 12.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the MD5 message digest value of a memoryblock as hex string.

See also:

MD5DigestMBS.MD5String(data as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Encryption and Hash MBS Encryption Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the MD5 message digest value of a string as hex string.
Example
// Compare RB5 MD5 to the one from MBS

dim a,b as String

a=EncodingToHexMBS(MD5("Franz jagt im komplett verwahrlosten Taxi quer durch Bayern"))
b=MD5DigestMBS.MD5String("Franz jagt im komplett verwahrlosten Taxi quer durch Bayern")

msgbox a+EndOfLine+b+EndOfLine+str(StrComp(a,b,0))

See also:

The items on this page are in the following plugins: MBS Encryption Plugin.


The biggest plugin in space...