Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

BlowfishMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Encryption and Hash MBS Encryption Plugin 6.3 Yes Yes Yes Yes No
Function: A class for blowfish encryption.
Example:
dim s as string

// create string with known encoding so we can later define encoding after decryption!
s=ConvertEncoding("Hello",Encodings.UTF8)

// encrypt with a key
s=BlowfishMBS.Encrypt("MyKey",s)

// encoding is not set for the result string, still RB can guess the encoding when displaying
MsgBox s

// decrypt with same key
s=BlowfishMBS.Decrypt("MyKey",s)

// encoding is not set for the result string, so change it back:
s=DefineEncoding(s,encodings.UTF8)

// show original Hello
MsgBox s
Notes: For newer projects we recommend switching to CipherMBS class.

Feedback, Comments & Corrections

  • 19 methods
    • method Decrypt(iodata as memoryblock)
    • method DecryptCBC(data as string, byref temp as memoryblock) as string
    • method DecryptCBC(idata as memoryblock, odata as memoryblock, offset as Integer, length as Integer, ivec as memoryblock)
    • method DecryptCFB64(data as string, byref temp as memoryblock) as string
    • method DecryptCFB64(idata as memoryblock, odata as memoryblock, offset as Integer, length as Integer, ivec as memoryblock, byref num as Integer)
    • method DecryptECB(data as string) as string
    • method DecryptECB(idata as memoryblock, odata as memoryblock, offset as Integer)
    • method DecryptOFB64(data as string, byref temp as memoryblock) as string
    • method DecryptOFB64(idata as memoryblock, odata as memoryblock, offset as Integer, length as Integer, ivec as memoryblock, byref num as Integer)
    • method Encrypt(iodata as memoryblock)
    • method EncryptCBC(data as string, byref temp as memoryblock) as string
    • method EncryptCBC(idata as memoryblock, odata as memoryblock, offset as Integer, length as Integer, ivec as memoryblock)
    • method EncryptCFB64(data as string, byref temp as memoryblock) as string
    • method EncryptCFB64(idata as memoryblock, odata as memoryblock, offset as Integer, length as Integer, ivec as memoryblock, byref num as Integer)
    • method EncryptECB(data as string) as string
    • method EncryptECB(idata as memoryblock, odata as memoryblock, offset as Integer)
    • method EncryptOFB64(data as string, byref temp as memoryblock) as string
    • method EncryptOFB64(idata as memoryblock, odata as memoryblock, offset as Integer, length as Integer, ivec as memoryblock, byref num as Integer)
    • method SetKey(key as string)
  • 2 shared methods
    • shared method Decrypt(key as string, data as string) as string
    • shared method Encrypt(key as string, data as string) as string

This class has no sub classes.

Some examples which use this class:

Blog Entries


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


BlockMBS   -   BZip2CompressMBS




Links
MBS Xojo Chart Plugins