public override byte[] EncryptData(byte[] p_data) { if (NeedToGenerateKey()) { CreateKeyPair(KeySizeValue); } ElGamalEncryptor x_enc = new ElGamalEncryptor(o_key_struct); return(x_enc.ProcessData(p_data)); }
public override byte[] EncryptData(byte[] p_data) { if (NeedToGenerateKey()) { // we need to create a new key before we can export CreateKeyPair(KeySizeValue); } // encrypt the data ElGamalEncryptor x_enc = new ElGamalEncryptor(o_key_struct); return(x_enc.ProcessData(p_data)); }