ArchiSteamFarm.CryptoHelper.DecryptAES C# (CSharp) Метод

DecryptAES() приватный статический Метод

private static DecryptAES ( string encrypted ) : string
encrypted string
Результат string
        private static string DecryptAES(string encrypted)
        {
            if (string.IsNullOrEmpty(encrypted)) {
                ASF.ArchiLogger.LogNullError(nameof(encrypted));
                return null;
            }

            try {
                byte[] key;
                using (SHA256Cng sha256 = new SHA256Cng()) {
                    key = sha256.ComputeHash(EncryptionKey);
                }

                byte[] decryptedData = Convert.FromBase64String(encrypted);
                decryptedData = SteamKit2.CryptoHelper.SymmetricDecrypt(decryptedData, key);
                return Encoding.UTF8.GetString(decryptedData);
            } catch (Exception e) {
                ASF.ArchiLogger.LogGenericException(e);
                return null;
            }
        }