@@ -9,18 +9,22 @@ import {
99} from './resources/crypto-v3-data-20231207'
1010import CryptoV3 from '../src/crypto-v3'
1111import Crypto from '../src/crypto'
12+ import { SIGNING_KEYS } from '../src/resource/signing-keys'
1213
1314const INTERNAL_TEST_VERSION = 3
1415
1516const testFileBuffer = new Uint8Array ( Buffer . from ( './resources/ogp.svg' ) )
1617
18+ const encryptionPublicKey = SIGNING_KEYS . test . publicKey
19+ const signingSecretKey = SIGNING_KEYS . test . secretKey
20+
1721jest . mock ( 'axios' , ( ) => mockAxios )
1822
1923describe ( 'CryptoV3' , function ( ) {
2024 afterEach ( ( ) => mockAxios . reset ( ) )
2125
22- const crypto = new CryptoV3 ( )
23- const cryptoV1 = new Crypto ( )
26+ const crypto = new CryptoV3 ( { signingPublicKey : encryptionPublicKey } )
27+ const cryptoV1 = new Crypto ( { signingPublicKey : encryptionPublicKey } )
2428
2529 it ( 'should generate a keypair' , ( ) => {
2630 const keypair = crypto . generate ( )
@@ -136,7 +140,7 @@ describe('CryptoV3', function () {
136140
137141 // Act
138142 const ciphertext = crypto . encrypt ( plaintext , publicKey )
139- const verifiedText = cryptoV1 . encrypt ( plainVerifiedText , publicKey )
143+ const verifiedText = cryptoV1 . encrypt ( plainVerifiedText , ciphertext . submissionPublicKey , signingSecretKey )
140144 const decrypted = crypto . decrypt ( secretKey , {
141145 ...ciphertext ,
142146 verifiedContent : verifiedText ,
0 commit comments