3.4.0 • Published 3 years ago
@proca/crypto v3.4.0
Proca SDK: encryption helpers
Proca server pushes actions to AMQP service in format defined in @proca/queue package.
The action or event data can contain Personal Identifiable Information (PII) in encrypted form.
This package provides helpers to decrypt the NaCL encrypted payload.
TypeScript types
KeyStore- Contains NaCL key pairs used to decrypt PII.
Functions
loadKeyStoreFromFile(filename : string)- loadKeyStorefrom a file.loadKeyStoreFromString(content : string)- loadKeyStorefrom a stringstoreKeyStoreToFile(keystore : KeyStore, filename? : string)- storeKeyStoreinto filedecryptPersonalInfo(pii : PersonalInfo | undefined, keyStore : KeyStore) : any- decryptPersonalInforecord (see @proca/queue definitions) using a providedKeyStore