import { CryptoEffects , EncryptedKeyPair , HASH , RSA_PARAMS } from '../common' ; import { exportedKeysToEncryptedKeyPair } from '../effects/exportedKeysToEncryptedKeyPair' ; import { generateRsaExportedKeys } from './generateRsaExportedKeys' ; param aesKey { CryptoKey } export function * generateEncryptedRsaKeyPair ( aesKey ) { const exportedKeys = yield * generateRsaExportedKeys ( ) ; return yield * exportedKeysToEncryptedKeyPair ( aesKey , { name : RSA_PARAMS . name , hash : HASH , } , exportedKeys ) ; }