import { DecryptionFixture , KeyInfoTuple , KMSKey , KmsKeyInfo , } from '@aws-crypto/integration-vectors' ; import { MaterialsManager } from '@aws-crypto/material-management' ; export interface MockedCmm extends MaterialsManager < any > { err ? : string ; } export interface MockedKeyInfoTuple { mockedCmm : MockedCmm ; } export const validKMSKeyInfo = { type : 'aws-kms' , key : 'valid key string' , } ; export const validKMSKey = { encrypt : true , decrypt : true , type : 'aws-kms' , 'key-id' : 'valid id' , } ; export const validKeyInfoArray = [ [ validKMSKeyInfo , validKMSKey ] , ] ; export const validPlaintext = Buffer . from ( 'valid plaintext' ) . toString ( 'base64' ) ; export const validCiphertext = Buffer . from ( 'valid ciphertext' ) . toString ( 'base64' ) ; export const failMeText = Buffer . from ( 'fail me text' ) . toString ( 'base64' ) ; export const validErrorDescription = 'valid error description' ; export const validPositiveTest = { name : 'validTestName' , description : 'valid positive test description' , keysInfo : validKeyInfoArray , cipherFile : 'valid cipherFile' , cipherText : validCiphertext , result : { plainText : validPlaintext } , } ; export const validNegativeTest = { name : validPositiveTest . name , description : 'valid negative test description' , keysInfo : validPositiveTest . keysInfo , cipherFile : validPositiveTest . cipherFile , cipherText : validCiphertext , result : { errorDescription : validErrorDescription } , } ; export const validPublicRSAKey = `-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8itbwPF0n/Z73iwLPXglhPLZi
/a/Ag6SbJR47vcmLUDbEalrTOUvu5sbuSNx91O3Bt4dxBRD/xFZRmKTljX8XUD4F
RQMdkxW5Q31lQ2XEupb71IqnNKxFoUtPAg7mnu1guxJ956H1ix3ZbJXUARi40UxO
FASu6J1BPSm0kerOsQIDAQAB
-----END PUBLIC KEY-----` ; export const validPrivateRSAKey = `-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQC8itbwPF0n/Z73iwLPXglhPLZi/a/Ag6SbJR47vcmLUDbEalrT
OUvu5sbuSNx91O3Bt4dxBRD/xFZRmKTljX8XUD4FRQMdkxW5Q31lQ2XEupb71Iqn
NKxFoUtPAg7mnu1guxJ956H1ix3ZbJXUARi40UxOFASu6J1BPSm0kerOsQIDAQAB
AoGBAKhbrgy9Sk4Aeif/mJXFGckbZp3EfGEC7EShg3rDQSpGiXEgq1O78SM2LeLv
avxt25TEpov0gzZwgse/71cP37BPWG7AaQzkh5gab4A9BtfO4S3D9uxXRtTQ6n5i
SC+qNxNYMnfOguo27zUZLoTly38RHUfYEQBXXvocMCvpEzTVAkEA6/vFMBdPYCAa
Sgb1WoJeczYmPRhLvbQ+kZ3SyQq7o5BM2qDwlrFIRzuIDcqUHBCZxpml7lrGikhP
89n5JCJmkwJBAMyI6mCTFb7tmqk8b+YOwGPsArNmr04zwJAckMip3qdlb1MNRn9d
EKDQZThVxIlsc3MN7BKjwn4RQPnTWgMWnCsCQBCGH6efajpz5QNb+2AsEssEdqb+
hYcyENOHdpQHQV5Ro2AHtvEGVuZN/9ffYIGak/n5FkpbZt2V9KtBjxV9pysCQQCD
k9CzL+vdV50XIfoaVYMOxNU38+byt/g4vSem7yB9L5PeKbwgUw5PZcC37PTyMwJS
EbK8ivyjfRX/oSdWtUThAkBhbPttdL2mqEb1+zqepT5yN0AdU8dvU7kHO6yeczpJ
HmwBrAG6l5qX9kKXmbQSz62ET91IAieUk+4re9xaxSbE
-----END RSA PRIVATE KEY-----` ; export const validPublicAESKey = `F0BKWWy9DR5sfSP82EWrgg==` ;