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

FAQ.How to encrypt a file with Blowfish?

Answer: You can use code like this:
dim fi as FolderItem = SpecialFolder.Desktop.Child("test.xojo_binary_project")
dim fo as FolderItem = SpecialFolder.Desktop.Child("test.encrypted")

// read input
dim bi as BinaryStream = BinaryStream.Open(fi)
dim si as string = bi.Read(bi.Length)

// encrypt
dim so as string = BlowfishMBS.Encrypt("MyKey",si)

// write output
dim bo as BinaryStream = BinaryStream.Create(fo)
bo.Write so
Notes: Of course you can decrypt same way, just use Decrypt function and of course swap files.

MBS Xojo PDF Plugins