Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

BlitzMax/Modules/BaH/Base64

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Base64 is a Public Domain Base64 Encoder/Decoder by Robert Harder. See Base64 for Java source. Types TBase64 Encode/Decode Base64 data. To Encode : SuperStrict Import BaH.Base64 Local someData:String = "Woo! BlitzMax Modules rock!" Local encoded:String = TBase64.Encode(someData, someData.length) Print "Encoded : " + encoded To Decode : SuperStrict Import BaH.Base64 Local encodedData:String = "V29vISBCbGl0ek1heCBNb2R1bGVzIHJvY2sh" Local data:Byte[] = TBase64.Decode(encodedData) Local decoded:String = String.FromBytes(data, data.length) Print "Decoded : " + decoded Functions Encode Decode TBase64: Functions Encode Function Encode:String( source:Byte Ptr, length:Int, offset:Int = 0, options:Int = 0) Description: Encode byte data to a Base64 encoded String, starting at offset of length bytes. Decode Function Decode:Byte[]( source:String, offset:Int = 0, options:Int = 0 ) Description: Decode Base64 encoded String to an array of Bytes, starting at offset.