Swift
Swift
Transition from Crypt2.Decode to BinData.AppendEncoded
Provides instructions for replacing deprecated Decode method calls with AppendEncoded.Chilkat Swift Downloads
func chilkatTest() {
var success: Bool = false
let crypt2 = CkoCrypt2()!
// ...
// ...
var byteData: NSData
var encoding: String? = "base64"
// ------------------------------------------------------------------------
// The Decode method is deprecated:
byteData = crypt2.decode(str: "ENCODED_DATA...", encoding: encoding)
// ------------------------------------------------------------------------
// Do the equivalent using BinData.AppendEncoded.
let bd = CkoBinData()!
success = bd.appendEncoded(encData: "ENCODED_DATA...", encoding: encoding)
byteData = bd.getData()
}