Platforms to show: All Mac Windows Linux Cross-Platform

Back to SHA512MBS class.

SHA512MBS.Hash(data as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Encryption and Hash MBS Encryption Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Convenience function to quickly create a hash for a given string.
Example
dim s2 as string = SHA512MBS.Hash("Frank jagt im komplett verwahrlosten Taxi quer durch Bayern")
dim e2 as string = EncodingToHexMBS(s2)

if e2 = "90B30EF9902AE4C4C691D2D78C2F8FA0AA785AFBC5545286B310F68E91DD2299C84A2484F0419FC5EAA7DE598940799E1091C4948926AE1C9488DDDAE180BB80" then
Msgbox "OK"
else
MsgBox "Failed"
end if

Returns the digest as binary string.
Before you show it to the user, pass it through EncodingToHexMBS.

SHA512MBS.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.

SHA512MBS.HashText(data as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Encryption and Hash MBS Encryption Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Convenience function to quickly create a hash for a given string.
Example
dim s1 as string = SHA512MBS.HashText("Franz jagt im komplett verwahrlosten Taxi quer durch Bayern")

if s1 = "AF9ED2DE700433B803240A552B41B5A472A6EF3FE1431A722B2063C75E9F07451F67A28E37D09CDE769424C96AEA6F8971389DB9E1993D6C565C3C71B855723C" then
Msgbox "OK"
else
MsgBox "Failed"
end if

Returns the digest as text string with hexadecimal digits.

SHA512MBS.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 19.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the a specific HASH based on the key and the data string.

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


The biggest plugin in space...