static LocalStorageAPI()
 {
     LocalStorageAPI.m_depotport          = 1119;
     LocalStorageAPI.m_completedDownloads = new List <LocalStorageFileState>();
     LocalStorageAPI.m_bufferSize         = 1024;
     LocalStorageAPI.s_log        = new LogThreadHelper("LocalStorage");
     LocalStorageAPI.m_downloadId = 0;
 }
        static SslSocket()
        {
            string str;

            SslSocket.s_streamValidationContexts     = new Map <SslStream, SslSocket.SslStreamValidateContext>();
            SslSocket.s_magicBundleSignaturePreamble = "NGIS";
            SslSocket.s_standardPublicExponent       = new byte[] { 1, 0, 1, 0 };
            SslSocket.s_standardPublicModulus        = new byte[] { 53, 255, 23, 231, 51, 196, 211, 212, 240, 55, 164, 181, 124, 27, 240, 78, 49, 232, 255, 179, 12, 30, 136, 16, 77, 175, 19, 11, 88, 86, 88, 25, 88, 55, 21, 249, 235, 236, 152, 203, 157, 204, 253, 24, 241, 71, 9, 27, 227, 123, 56, 40, 158, 14, 155, 31, 159, 149, 218, 157, 97, 117, 242, 31, 160, 61, 162, 153, 189, 178, 29, 14, 105, 202, 188, 115, 27, 229, 235, 15, 231, 251, 43, 123, 178, 53, 5, 143, 245, 181, 154, 59, 18, 173, 161, 164, 140, 247, 144, 102, 136, 23, 214, 31, 147, 132, 16, 174, 242, 239, 42, 122, 95, 65, 123, 92, 128, 210, 94, 26, 253, 219, 16, 118, 147, 188, 139, 213, 230, 178, 80, 245, 81, 155, 3, 226, 83, 155, 168, 176, 177, 55, 213, 37, 102, 69, 8, 129, 32, 15, 136, 97, 174, 187, 245, 68, 245, 132, 158, 118, 39, 21, 116, 23, 198, 183, 143, 224, 45, 55, 92, 248, 82, 49, 50, 63, 250, 68, 127, 239, 36, 61, 91, 89, 249, 253, 80, 80, 202, 160, 54, 77, 98, 217, 68, 13, 105, 166, 239, 43, 206, 204, 194, 163, 188, 245, 162, 28, 238, 119, 69, 228, 51, 240, 87, 32, 191, 46, 7, 134, 43, 149, 187, 58, 252, 4, 60, 69, 63, 0, 52, 11, 54, 187, 75, 193, 15, 149, 24, 195, 217, 250, 54, 66, 202, 150, 170, 236, 122, 46, 136, 130, 60, 29, 152, 148 };
            SslSocket.s_debugPublicExponent          = new byte[] { 1, 0, 1, 0 };
            SslSocket.s_debugPublicModulus           = new byte[] { 133, 243, 123, 20, 90, 156, 72, 246, 79, 229, 73, 223, 100, 255, 35, 43, 111, 158, 174, 59, 13, 207, 219, 80, 164, 251, 93, 160, 119, 204, 236, 249, 106, 12, 191, 31, 19, 173, 45, 8, 208, 211, 12, 85, 187, 50, 166, 112, 178, 45, 160, 25, 10, 24, 200, 200, 69, 126, 17, 102, 65, 20, 184, 123, 229, 77, 195, 184, 109, 210, 8, 183, 31, 238, 180, 155, 156, 231, 203, 148, 186, 235, 236, 200, 155, 37, 156, 192, 152, 78, 214, 10, 155, 134, 106, 91, 112, 117, 27, 120, 179, 68, 172, 107, 64, 129, 222, 215, 98, 229, 7, 183, 89, 67, 250, 8, 12, 167, 197, 111, 29, 235, 63, 225, 128, 171, 115, 109, 166, 70, 248, 236, 219, 172, 96, 148, 28, 63, 216, 217, 4, 150, 104, 52, 146, 26, 205, 201, 168, 43, 51, 5, 143, 75, 39, 34, 64, 42, 215, 247, 190, 151, 237, 118, 104, 231, 37, 194, 144, 173, 78, 241, 231, 180, 168, 65, 84, 58, 62, 24, 172, 33, 244, 211, 67, 109, 68, 128, 64, 71, 125, 99, 4, 29, 94, 6, 139, 159, 59, 6, 43, 162, 140, 23, 48, 128, 224, 103, 197, 33, 61, 63, 126, 157, 99, 220, 246, 80, 122, 159, 175, 194, 47, 7, 10, 187, 225, 139, 48, 171, 158, 244, 252, 43, 20, 201, 5, 61, 53, 80, 92, 245, 233, 111, 46, 38, 80, 151, 17, 129, 179, 215, 43, 149, 115, 166 };
            SslSocket.s_log             = new LogThreadHelper("SslSocket");
            str                         = (BattleNet.Client().GetMobileEnvironment() != constants.MobileEnv.PRODUCTION ? "-----BEGIN CERTIFICATE-----MIIGvTCCBKWgAwIBAgIJANOYGVoF3JlVMA0GC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+ViFsWmmkWUpwxn65oM9lhBYs6UlBSB4BitM764rS5P6utqMDYYMA==-----END CERTIFICATE-----");
            SslSocket.s_rootCertificate = new X509Certificate2(Encoding.ASCII.GetBytes(str));
        }