public async Task <byte[]> DecryptAsync(int appId, byte[] bytes) { var appInfo = await _appInfoDataAccess.GetModelWithCacheAsync(appId); if (appInfo == null) { throw new InvalidOperationException("Decryption failed"); } return(AesManager.Decrypt(bytes, appInfo.AppKey, appInfo.AppSecret)); }