Facebook.AuthContextBase.FromBase64String C# (CSharp) Method

FromBase64String() protected static method

A helper to extract byte array from url encoded base64.
protected static FromBase64String ( string str ) : byte[]
str string
return byte[]
        protected static byte[] FromBase64String(string str)
        {
            str = str.Replace('-', '+').Replace('_', '/');
            int mod = str.Length % 4;
            str = str.PadRight(str.Length + (mod == 0 ? 0 : 4 - mod), '=');
            return Convert.FromBase64String(str);
        }