import { combine } from '@typed/effects' ; import { importExportedKeyPair } from '../asymmetrical/importExportedKeyPair' ; import { CryptoEffects , EncryptedKeyPair , ExportedKeyPair } from '../common' ; import { encryptExportedKeyPair } from './encryptExportedKeyPair' ; export function * exportedKeysToEncryptedKeyPair ( aesKey , params , exportedKeys ) { const [ encrypted , keyPair ] = yield * combine ( encryptExportedKeyPair ( aesKey , exportedKeys ) , importExportedKeyPair ( params , exportedKeys ) ) ; return { ... keyPair , encrypted , } as const ; }