Encoding and Decoding Base64 with the N/crypto Module

/**  * @NApiVersion 2.x  * @NScriptType Suitelet  */ define([‘N/crypto’, ‘N/log’], function (crypto, log) {   function onRequest(context) {     let text = ‘Sample Data’;           // Encode to Base64     let encoded = crypto.encode({       input: text,       outputEncoding: crypto.Encoding.BASE_64     });     log.debug(‘Encoded (Base64):’, encoded);     // Decode from Base64     let decoded = crypto.decode({       input: encoded,       inputEncoding: crypto.Encoding.BASE_64     });     log.debug(‘Decoded:’, decoded);     context.response.write(‘Encoded:… Continue reading Encoding and Decoding Base64 with the N/crypto Module