Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

SHA1MBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Encryption and Hash MBS Encryption Plugin 3.1 Yes Yes Yes Yes No
Function: 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"
Notes:
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.

Feedback, Comments & Corrections

  • 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 which use this class:


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


SFPasswordAssistantMBS   -   SHA256MBS





Links
MBS Xojo Chart Plugins