@transact-open-ux/core
Version:
Provides utility methods to integrate with the Transact Platform
32 lines (31 loc) • 917 B
TypeScript
declare global {
interface Crypto {
webkitSubtle: object;
}
interface Window {
msCrypto: Crypto;
}
}
/**
* TM Form Data Encryption
* Please note the data encryption/decryption only works in:
* - Modern browsers (Chrome v44+, Firefox, Edge v20+)
* - IE 11
* TM will make sure data is not encrypted in other browsers, hence these methods
* will not be called in this case
* You should also avoid calling the following three methods explicitly if browser is
* not listed above
* @param data
* @param requestKey
* @returns {promise}
* @private
*/
declare const tmEncryptData: (data: any, requestKey: any) => any;
/**
* TM Form Data Decryption
* @param encryptedDataBase64
* @returns {promise}
* @private
*/
declare const tmDecryptData: (encryptedDataBase64: any) => Promise<{}>;
export { tmEncryptData, tmDecryptData };