@@ -19,7 +19,7 @@ export const testEncryption = async tc => {
1919 t . compare ( data , dec )
2020 } )
2121 await t . groupAsync ( 'RSA' , async ( ) => {
22- const keypair = await rsa . generateKey ( )
22+ const keypair = await rsa . generateKeyPair ( )
2323 const enc = await rsa . encrypt ( keypair . publicKey , data )
2424 const dec = await rsa . decrypt ( keypair . privateKey , enc )
2525 t . compare ( data , dec )
@@ -35,8 +35,8 @@ export const testEncryption = async tc => {
3535 } )
3636 await t . groupAsync ( 'asymmetric can fail' , async ( ) => {
3737 await t . failsAsync ( async ( ) => {
38- const keypair = await rsa . generateKey ( )
39- const keypair2 = await rsa . generateKey ( )
38+ const keypair = await rsa . generateKeyPair ( )
39+ const keypair2 = await rsa . generateKeyPair ( )
4040 const enc = await rsa . encrypt ( keypair . privateKey , data )
4141 const dec = await rsa . decrypt ( keypair2 . publicKey , enc )
4242 t . compare ( data , dec )
@@ -102,7 +102,7 @@ export const testImportExport = async tc => {
102102 t . compare ( jwkPublic , ejwkPublic )
103103 } )
104104 await t . groupAsync ( 'rsa-oaep' , async ( ) => {
105- const keypair = await rsa . generateKey ( { extractable : true } )
105+ const keypair = await rsa . generateKeyPair ( { extractable : true } )
106106 const jwkPrivate = await rsa . exportKey ( keypair . privateKey )
107107 const jwkPublic = await rsa . exportKey ( keypair . publicKey )
108108 const ekeyPrivate = await rsa . importKey ( jwkPrivate , { extractable : true } )
0 commit comments