Пример #1
0
        /// <inheritdoc />
        public SeperateAggregateCryptoInitializationService(ICryptoKeyInitializable <TVectorType> encryptionInitializable, ICryptoKeyInitializable <TVectorType> decryptionInitializable)
        {
            if (encryptionInitializable == null)
            {
                throw new ArgumentNullException(nameof(encryptionInitializable));
            }
            if (decryptionInitializable == null)
            {
                throw new ArgumentNullException(nameof(decryptionInitializable));
            }

            EncryptionInitializable = encryptionInitializable;
            DecryptionInitializable = decryptionInitializable;
        }
Пример #2
0
 /// <inheritdoc />
 public WotlkToVanillaGameAuthRequestPayloadHandler([NotNull] ILog logger, [NotNull] ICryptoKeyInitializable <byte[]> cryptoInit)
     : base(logger)
 {
     CryptoInitializer = cryptoInit ?? throw new ArgumentNullException(nameof(cryptoInit));
 }
        private ContainerBuilder RegisterCryptoInitializable([NotNull] ContainerBuilder builder, [NotNull] ICryptoKeyInitializable <byte[]> initializable, CryptoType cryptoType)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (initializable == null)
            {
                throw new ArgumentNullException(nameof(initializable));
            }

            builder
            .RegisterInstance(initializable)
            .Keyed <ICryptoKeyInitializable <byte[]> >(cryptoType)
            .SingleInstance()
            .ExternallyOwned();

            return(builder);
        }
Пример #4
0
 /// <inheritdoc />
 public ProxiedFullCryptoInitializable([NotNull] ICryptoKeyInitializable <byte[]> encryptionInitializable, [NotNull] ICryptoKeyInitializable <byte[]> decryptionInitializable)
 {
     EncryptionInitializable = encryptionInitializable ?? throw new ArgumentNullException(nameof(encryptionInitializable));
     DecryptionInitializable = decryptionInitializable ?? throw new ArgumentNullException(nameof(decryptionInitializable));
 }