public byte[] Decrypt(int appId, byte[] bytes) { var appInfo = _appInfoDataAccess.GetModelWithCache(appId); if (appInfo == null) { throw new InvalidOperationException("Decryption failed"); } return(AesManager.Decrypt(bytes, appInfo.AppKey, appInfo.AppSecret)); }