private function encryptFile(e:MouseEvent):void { if (textView.encryptText.length != 0 && textView.encryptKey.length != 0)//Checks if the textfields aren't empty { /* mdm.Encryption.encryptFile(key:String, inputFile:String, outputFile:String, [oldMethod:Boolean = true]):Void -The old method is set to false to allow decryption in windows, mac and linux */ mdm.Encryption.encryptFile(textView.encryptKey.text, textView.encryptText.text, textView.encryptText.text + "-Encrypted", false); message.text = "Encryption Completed"; } else { trace("Please fill all fields"); } } private function decryptFile(e:MouseEvent):void { if (textView.encryptText.length != 0 && textView.encryptKey.length != 0) { /* mdm.Encryption.decryptFile(key:String, inputFile:String, outputFile:String, [oldMethod:Boolean = true]):Void */ mdm.Encryption.decryptFile(textView.encryptKey.text, textView.encryptText.text, textView.encryptText.text + "-Decrypted", false); message.text = "Decryption Completed"; } else { trace("Please fill all fields"); } }