Looking to decrypt an ApplePay token using NPM packages in JavaScript. Although there are repositories available for decrypting in Ruby like https://github.com/spreedly/gala, I am interested in porting it to JavaScript. However, I am uncertain about the JavaScript equivalent of the OpenSSL calls below:
OpenSSL::Cipher.new("aes-256-gcm").decrypt
OpenSSL::PKey::EC.new(Base64.decode64(ephemeral_public_key))
OpenSSL::X509::Store.new
Digest::SHA256.new
If anyone can guide me to an NPM package and the equivalent functions, I would greatly appreciate it.