File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ const SUITE = 'cipher';
1515
1616// --- Constants and Test Data ---
1717const key16 = Buffer . from ( 'a8a7d6a5d4a3d2a1a09f9e9d9c8b8a89' , 'hex' ) ;
18- const key32 = Buffer . from ( 'a8a7d6a5d4a3d2a1a09f9e9d9c8b8a89a8a7d6a5d4a3d2a1a09f9e9d9c8b8a89' , 'hex' ) ;
18+ const key32 = Buffer . from (
19+ 'a8a7d6a5d4a3d2a1a09f9e9d9c8b8a89a8a7d6a5d4a3d2a1a09f9e9d9c8b8a89' ,
20+ 'hex' ,
21+ ) ;
1922const iv16 = randomFillSync ( new Uint8Array ( 16 ) ) ;
2023const iv12 = randomFillSync ( new Uint8Array ( 12 ) ) ; // Common IV size for GCM/CCM/OCB
2124const iv = Buffer . from ( iv16 ) ;
@@ -204,7 +207,7 @@ allCiphers.forEach(cipherName => {
204207// libsodium cipher tests
205208test ( SUITE , 'xsalsa20' , ( ) => {
206209 const key = new Uint8Array ( key32 ) ;
207- let nonce = randomFillSync ( new Uint8Array ( 24 ) ) ;
210+ const nonce = randomFillSync ( new Uint8Array ( 24 ) ) ;
208211 const data = new Uint8Array ( plaintextBuffer ) ;
209212 // encrypt
210213 const ciphertext = xsalsa20 ( key , nonce , data ) ;
You can’t perform that action at this time.
0 commit comments