コード例 #1
0
        /// <summary>
        /// Serialize messages using the BSON message serializer with AES Encryption
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="keyProvider">
        /// The custom key provider to provide the symmetric key for encryption of plaintext message and decryption of ciphertext message
        /// </param>
        public static void UseEncryption(this IEventHubFactoryConfigurator configurator, ISecureKeyProvider keyProvider)
        {
            var streamProvider = new AesCryptoStreamProviderV2(keyProvider);

            configurator.UseEncryptedSerializerV2(streamProvider);
        }
コード例 #2
0
 public AesCryptoStreamProviderV2(ISecureKeyProvider secureKeyProvider,
                                  PaddingMode paddingMode = PaddingMode.PKCS7)
 {
     _secureKeyProvider = secureKeyProvider;
     _paddingMode       = paddingMode;
 }
コード例 #3
0
        /// <summary>
        /// Serialize messages using the BSON message serializer with AES Encryption
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="keyProvider">The custom key provider to provide the symmetric key for encryption of plaintext message and decryption of ciphertext message</param>
        public static void UseEncryption(this IReceiveEndpointConfigurator configurator, ISecureKeyProvider keyProvider)
        {
            var streamProvider = new AesCryptoStreamProviderV2(keyProvider);

            configurator.UseEncryptedSerializerV2(streamProvider);
        }
コード例 #4
0
 public static void UseEncryption(ISecureKeyProvider keyProvider)
 {
     _streamProvider = new AesCryptoStreamProviderV2(keyProvider);
     _useEncryption  = true;
 }