Facebook.AuthContextBase.GenerateSignature C# (CSharp) Method

GenerateSignature() private method

private GenerateSignature ( [ data ) : string
data [
return string
        protected string GenerateSignature([NotNull] JsonObject data)
        {
            if (data == null)
                throw FacebookApi.Nre("data");

            if (!data.IsDictionary)
                return null;

            var keys = new List<string>(data.Dictionary.Keys.Where(k => k != "sig"));
            keys.Sort(s_comparison);

            var sb = new StringBuilder();
            foreach (string key in keys)
                sb.Append(key).Append('=').Append(data.Dictionary[key].String);

            sb.Append(AppSecret);

            using (HashAlgorithm md5 = MD5.Create())
                return ByteArrayToHexString(md5.ComputeHash(Encoding.ASCII.GetBytes(sb.ToString())));
        }