private Cipher GetDecryptFn(CipherV1 cipher) { return(data => { var arr = data.Split('_'); return cipher.Process(false, arr[0], arr[1]); }); }
private Cipher GetEncryptFn(CipherV1 cipher) { return(data => { var iv = Util.GenerateRandom(IV_LENGTH); var str = cipher.Process(true, iv, data); return iv + "_" + str; }); }