Encryption and Decryption in Axapta
TextBuffer textBuffer = new TextBuffer();
;
textBuffer.setText(_text);
textBuffer.encrypt(987654123); // Basic encryption
To decrypt the string again, use the following code:
TextBuffer textBuffer = new TextBuffer();
;
textBuffer.setText(_text);
textBuffer.decrypt(987654123);
decryptedString = textBuffer.getText();