-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #247 from NYPL/SCC-3099
Scc 3099 Include Checkin cards
- Loading branch information
Showing
120 changed files
with
11,975 additions
and
210,145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const KMS = require('aws-sdk/clients/kms') | ||
|
||
function decrypt (encrypted) { | ||
return new Promise((resolve, reject) => { | ||
const kms = new KMS({ region: 'us-east-1' }) | ||
kms.decrypt({ CiphertextBlob: Buffer.from(encrypted, 'base64') }, (err, data) => { | ||
if (err) return reject(err) | ||
|
||
const decrypted = data.Plaintext.toString('ascii') | ||
resolve(decrypted) | ||
}) | ||
}) | ||
} | ||
|
||
module.exports = { decrypt } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.