Page 1 of 1

will act as the “back-end

Posted: Sun Dec 22, 2024 7:51 am
by hasinam2206
You can view it from the event object.) javascript copy the code let encryptedcarddigits = aes.encrypt(event.digits, secret_key) this function manages the encryption of the collected information. Create a decrypt-gather function finally, let's see how to create a function to show how sensitive data is decrypted.

In a production environment, this request is typically made to your backend service which processes the caller's information as needed for your business. singapore mobile number list In this solution, a third function ervice” that processes this data. This function will receive the encrypted numbers and decrypt them for further processing. Code create a new function named decrypt-gather with the following code: javascript copy the code const aes = require(runtime.

Image

Getfunctions()['aes'].path) exports.handler = function(context, event, callback) { const response = new twilio.response() const secret_key = context.aes_secret const last4card = aes.decrypt(event.encryptedcarddigits, secret_key) const pin = aes.decrypt(event.encryptedpindigits, secret_key) //hard-coded values used for testing purposes if (last4card === "1234" && pin === "4321") { response.setbody(json.stringify({ account: "ac12345678", balance: "12.55" })) } else { response.