当前位置: 首页>>代码示例>>C#>>正文


C# EndpointConfiguration.RijndaelEncryptionService方法代码示例

本文整理汇总了C#中EndpointConfiguration.RijndaelEncryptionService方法的典型用法代码示例。如果您正苦于以下问题:C# EndpointConfiguration.RijndaelEncryptionService方法的具体用法?C# EndpointConfiguration.RijndaelEncryptionService怎么用?C# EndpointConfiguration.RijndaelEncryptionService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EndpointConfiguration的用法示例。


在下文中一共展示了EndpointConfiguration.RijndaelEncryptionService方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AsyncMain

    static async Task AsyncMain()
    {
        Console.Title = "Samples.Unobtrusive.Client";
        var endpointConfiguration = new EndpointConfiguration("Samples.Unobtrusive.Client");
        endpointConfiguration.EnableInstallers();
        endpointConfiguration.UsePersistence<InMemoryPersistence>();
        endpointConfiguration.UseDataBus<FileShareDataBus>()
            .BasePath(@"..\..\..\DataBusShare\");
        byte[] encryptionKey = Encoding.ASCII.GetBytes("gdDbqRpqdRbTs3mhdZh9qCaDaxJXl+e6");
        endpointConfiguration.RijndaelEncryptionService("2015-10", encryptionKey);
        endpointConfiguration.SendFailedMessagesTo("error");

        endpointConfiguration.ApplyCustomConventions();

        var endpointInstance = await Endpoint.Start(endpointConfiguration)
            .ConfigureAwait(false);
        try
        {
            await CommandSender.Start(endpointInstance)
                .ConfigureAwait(false);
        }
        finally
        {
            await endpointInstance.Stop()
                .ConfigureAwait(false);
        }
    }
开发者ID:chriscatilo,项目名称:docs.particular.net,代码行数:27,代码来源:Program.cs

示例2: Usage

        Usage(EndpointConfiguration endpointConfiguration)
        {
            #region EncryptionServiceSimple

            endpointConfiguration.RijndaelEncryptionService();

            #endregion
        }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:8,代码来源:Usage.cs

示例3: Usage

        public Usage()
        {
            #region EncryptionServiceSimple

            EndpointConfiguration configuration = new EndpointConfiguration();
            configuration.RijndaelEncryptionService();

            #endregion
        }
开发者ID:fivec,项目名称:docs.particular.net,代码行数:9,代码来源:Usage.cs

示例4: FromCode

        FromCode(EndpointConfiguration endpointConfiguration)
        {
#pragma warning disable 618
            #region EncryptionFromCode
            var encryptionKeyIdentifier = "2015-10";
            var encryptionKey = Convert.FromBase64String("gdDbqRpqdRbTs3mhdZh9qCaDaxJXl+e6");
            var expiredKeys = new List<byte[]>
            {
                Encoding.ASCII.GetBytes("abDbqRpQdRbTs3mhdZh9qCaDaxJXl+e6"),
                Encoding.ASCII.GetBytes("cdDbqRpQdRbTs3mhdZh9qCaDaxJXl+e6")
            };
            endpointConfiguration.RijndaelEncryptionService(encryptionKeyIdentifier, encryptionKey, expiredKeys);

            #endregion
#pragma warning restore 618
        }
开发者ID:chriscatilo,项目名称:docs.particular.net,代码行数:16,代码来源:FromCode.cs

示例5: AsyncMain

    static async Task AsyncMain()
    {
        Console.Title = "Samples.Encryption.Endpoint1";
        var endpointConfiguration = new EndpointConfiguration("Samples.Encryption.Endpoint1");
        #region enableEncryption
        endpointConfiguration.RijndaelEncryptionService();
        #endregion
        endpointConfiguration.UsePersistence<InMemoryPersistence>();
        endpointConfiguration.UseSerialization<JsonSerializer>();
        endpointConfiguration.SendFailedMessagesTo("error");
        var endpointInstance = await Endpoint.Start(endpointConfiguration)
            .ConfigureAwait(false);
        try
        {
            var message = new MessageWithSecretData
            {
                Secret = "betcha can't guess my secret",
                SubProperty = new MySecretSubProperty
                {
                    Secret = "My sub secret"
                },
                CreditCards = new List<CreditCardDetails>
                {
                    new CreditCardDetails
                    {
                        ValidTo = DateTime.UtcNow.AddYears(1),
                        Number = "312312312312312"
                    },
                    new CreditCardDetails
                    {
                        ValidTo = DateTime.UtcNow.AddYears(2),
                        Number = "543645546546456"
                    }
                }
            };
            await endpointInstance.Send("Samples.Encryption.Endpoint2", message)
                .ConfigureAwait(false);

            Console.WriteLine("MessageWithSecretData sent. Press any key to exit");
            Console.ReadKey();
        }
        finally
        {
            await endpointInstance.Stop()
                .ConfigureAwait(false);
        }
    }
开发者ID:chriscatilo,项目名称:docs.particular.net,代码行数:47,代码来源:Program.cs

示例6: FromCode

        public FromCode()
        {
#pragma warning disable 618
            #region EncryptionFromCode

            EndpointConfiguration configuration = new EndpointConfiguration();
            string encryptionKey = "gdDbqRpqdRbTs3mhdZh9qCaDaxJXl+e6";
            List<string> expiredKeys = new List<string>
            {
                "abDbqRpQdRbTs3mhdZh9qCaDaxJXl+e6",
                "cdDbqRpQdRbTs3mhdZh9qCaDaxJXl+e6"
            };
            configuration.RijndaelEncryptionService(encryptionKey, expiredKeys);

            #endregion
#pragma warning restore 618
        }
开发者ID:fivec,项目名称:docs.particular.net,代码行数:17,代码来源:FromCode.cs

示例7: AsyncMain

 static async Task AsyncMain()
 {
     Console.Title = "Samples.Encryption.Endpoint2";
     EndpointConfiguration endpointConfiguration = new EndpointConfiguration("Samples.Encryption.Endpoint2");
     endpointConfiguration.RijndaelEncryptionService();
     endpointConfiguration.UsePersistence<InMemoryPersistence>();
     endpointConfiguration.UseSerialization<JsonSerializer>();
     endpointConfiguration.SendFailedMessagesTo("error");
     IEndpointInstance endpoint = await Endpoint.Start(endpointConfiguration);
     try
     {
         Console.WriteLine("Press any key to exit");
         Console.ReadKey();
     }
     finally
     {
         await endpoint.Stop();
     }
 }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:19,代码来源:Program.cs

示例8: AsyncMain

    static async Task AsyncMain()
    {
        EndpointConfiguration endpointConfiguration = new EndpointConfiguration();
        endpointConfiguration.EndpointName("Samples.Unobtrusive.Client");
        endpointConfiguration.EnableInstallers();
        endpointConfiguration.UsePersistence<InMemoryPersistence>();
        endpointConfiguration.UseDataBus<FileShareDataBus>()
            .BasePath(@"..\..\..\DataBusShare\");
        endpointConfiguration.RijndaelEncryptionService("gdDbqRpqdRbTs3mhdZh8qCaDaxJXl+e7");
        endpointConfiguration.SendFailedMessagesTo("error");

        endpointConfiguration.ApplyCustomConventions();

        IEndpointInstance endpoint = await Endpoint.Start(endpointConfiguration);
        try
        {
            await CommandSender.Start(endpoint);
        }
        finally
        {
            await endpoint.Stop();
        }
    }
开发者ID:fivec,项目名称:docs.particular.net,代码行数:23,代码来源:Program.cs


注:本文中的EndpointConfiguration.RijndaelEncryptionService方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。