FAQ

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to encrypt a file with Blowfish?

Answer: You can use code like this:
Example
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)
bi.Close

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

// write output
dim bo as BinaryStream = BinaryStream.Create(fo)
bo.Write so
bo.Close

Of course you can decrypt same way, just use Decrypt function and of course swap files.


💬 Ask a question or report a problem