import { CryptoEffects , RSA_PARAMS } from '../common' ; import { encrypt } from '../effects/subtle' ; export function * encryptWithRsaKeyPair ( keyPair , data ) { return yield * encrypt ( { name : RSA_PARAMS . name } , keyPair . publicKey , data ) ; }