コード例 #1
0
ファイル: KmsProtector.cs プロジェクト: yasinkultur/Amazon
        public KmsProtector(AwsRegion region, IAwsCredentials credentials, string keyId)
        {
            #region Preconditions

            if (region == null)
            {
                throw new ArgumentNullException(nameof(region));
            }

            if (credentials == null)
            {
                throw new ArgumentNullException(nameof(credentials));
            }

            if (keyId == null)
            {
                throw new ArgumentNullException(nameof(keyId));
            }

            #endregion

            this.client = new KmsClient(region, credentials);
            this.keyId  = keyId;
        }
コード例 #2
0
 public KmsProtector(KmsClient client, string keyId)
 {
     this.client = client ?? throw new ArgumentNullException(nameof(client));
     this.keyId  = keyId ?? throw new ArgumentNullException(nameof(keyId));
 }