A Lambda function for AES encryption/decryption
Note: This function exists largely to test the Lambda Function Manager. Using lfm you can deploy this function via the following:
$ lfm deploy gh:willyg302/aws-lambda-aes
aws-lambda-aes accepts a custom event with the following properties:
enc
: A boolean, true if you want to encrypt and false otherwisemessage
: The message to encrypt or decryptpass
: A password to use as the keyopts
: Optional object containing cipher optionslength
: Key length to use, one of128
,192
, or256
mode
: Supported modes arecbc
,cfb
,cfb1
,cfb8
,ctr
,ecb
,gcm
, andofb
encoding
: Whether to encode asbase64
orhex
By default, aws-lambda-aes uses aes-256-ecb
to/from base64
.
Call tests with npm test
.