Exemple #1
0
        public U2FClient([NotNull] ISender sender, [CanBeNull] CheckAppIdOrOrigin originChecker,
                         [CanBeNull] CheckAppIdOrOrigin appIdChecker, [NotNull] IKeyOperations keyOperations,
                         [NotNull] IClientCrypto crypto)
        {
            if (sender == null)
            {
                throw new ArgumentNullException(nameof(sender));
            }
            if (keyOperations == null)
            {
                throw new ArgumentNullException(nameof(keyOperations));
            }
            if (crypto == null)
            {
                throw new ArgumentNullException(nameof(crypto));
            }

            this.sender        = sender;
            this.originChecker = originChecker ?? NoAppIdOrOriginCheck;
            this.appIdChecker  = appIdChecker ?? NoAppIdOrOriginCheck;
            this.keyOperations = keyOperations;
            this.crypto        = crypto;
        }
Exemple #2
0
        public U2FClient([NotNull] ISender sender, [CanBeNull] CheckAppIdOrOrigin originChecker,
            [CanBeNull] CheckAppIdOrOrigin appIdChecker, [NotNull] IKeyOperations keyOperations,
            [NotNull] IClientCrypto crypto)
        {
            if (sender == null)
            {
                throw new ArgumentNullException(nameof(sender));
            }
            if (keyOperations == null)
            {
                throw new ArgumentNullException(nameof(keyOperations));
            }
            if (crypto == null)
            {
                throw new ArgumentNullException(nameof(crypto));
            }

            this.sender = sender;
            this.originChecker = originChecker ?? NoAppIdOrOriginCheck;
            this.appIdChecker = appIdChecker ?? NoAppIdOrOriginCheck;
            this.keyOperations = keyOperations;
            this.crypto = crypto;
        }
Exemple #3
0
 public U2FClient([NotNull] ISender sender, [CanBeNull] CheckAppIdOrOrigin originChecker,
                  [CanBeNull] CheckAppIdOrOrigin appIdChecker, [NotNull] IKeyFactory keyFactory,
                  [NotNull] IClientCrypto crypto)
     : this(sender, originChecker, appIdChecker, new KeyOperations(keyFactory), crypto)
 {
 }