MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

DecodeBase64MBS(s as string) as string
global method, Base 64, MBS Encryption Plugin (Base64),
Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Decodes the base 64 text string into its original binary data.
Notes: Improved in MBS Plugin 2.7. Memory needed is around lenb(s)*2.

Some examples using this method:

EncodeBase64MBS(s as string,breakposition as Integer, breakstring as string) as string
global method, Base 64, MBS Encryption Plugin (Base64),
Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: Encodes the binary data in the string into a base64 text string.
Notes: Improved in MBS Plugin 2.7 to support breakposition and breakstring. If you don't need them, just pass 0 and "". Memory needed is around lenb(s)*2.8.

Some examples using this method:

uuDecodeMBS(data as string, byref name as string, byref mode as Integer) as string
global method, Base 64, MBS Encryption Plugin (Base64),
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: UU Decoding.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.uu")
dim b as BinaryStream = BinaryStream.Open(f)

dim name as string
dim mode as Integer

dim s as String = b.Read(b.Length)
dim d as string = uuDecodeMBS(s, name, mode)

dim p as Picture = Picture.FromData(d)

Backdrop = p
Notes:
Decodes UU encoded data. name and mode properties are filled.
Returns empty text if something goes wrong.
Raises out of memory exception in case of low memory situation.
uuEncodeMBS(data as string, name as string, mode as Integer = &o755) as string
global method, Base 64, MBS Encryption Plugin (Base64),
Plugin version: 16.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.

Function: UU Encoding.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim b as BinaryStream = BinaryStream.Open(f)
dim s as string = b.Read(b.Length)

dim d as string = uuEncodeMBS(s, "test")

f = SpecialFolder.Desktop.Child("test.txt")
b = BinaryStream.Create(f, true)

b.Write d
Notes:
Encodes binary data as text similar to Base64.
The data is prefixed with file name and mode.

Returns empty text if something goes wrong.
Raises out of memory exception in case of low memory situation.

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




Links
MBS FileMaker blog