public RepositoryResponse <CryptoViewModel <string> > Decrypt([FromBody] JObject model) { string data = model.GetValue("data")?.Value <string>(); string key = model.GetValue("key")?.Value <string>(); return(AesEncryptionHelper.DecryptStringFromBytes_Aes(data, key)); }
public RepositoryResponse <CryptoViewModel <JObject> > Decrypt([FromBody] JObject model) { string data = model.GetValue("data").Value <string>(); string key = model.GetValue("key").Value <string>(); string iv = model.GetValue("iv").Value <string>(); return(new RepositoryResponse <CryptoViewModel <JObject> >() { Data = AesEncryptionHelper.DecryptStringFromBytes_Aes(data, key, iv) }); }