Platforms to show: All Mac Windows Linux Cross-Platform

SHA1MBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Encryption and Hash MBS Encryption Plugin 3.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
An implementation of the SHA1 algorithem to calculate hash values.
Example
dim f as FolderItem
dim b as BinaryStream
dim s as string
dim m as new SHA1MBS

// process file part by part (big files)

f=SpecialFolder.Desktop.Child("test.jpg")
b=f.OpenAsBinaryFile(False)

while not b.eof
s=b.Read(1000000)
m.Add s

wend

MsgBox EncodingToHexMBS(m.Result)+" using plugin with SHA1MBS"

The source in RB is in the examples folder (see Crypto 1.5 via RB). This implementation inside the plugin is only to make the calculation faster.
In case RS will improve RB more to produce faster code, the plugin may be no longer needed.

  • 4 methods
  • 4 shared methods
    • shared method Hash(data as string) as string
    • shared method HashFile(file as FolderItem, Hex as boolean = true) as string
    • shared method HashText(data as string) as string
    • shared method HMAC(key as string, data as string) as string

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


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


SFVoiceAnalyticsMBS   -   SHA256MBS


The biggest plugin in space...