Ejemplo n.º 1
0
 /// <summary>
 ///   Creates a new instance of the IpSecKeyRecord class
 /// </summary>
 /// <param name="name"> Name of the record </param>
 /// <param name="timeToLive"> Seconds the record should be cached at most </param>
 /// <param name="precedence"> Precedence of the record </param>
 /// <param name="gatewayType"> Type of gateway </param>
 /// <param name="algorithm"> Algorithm of the key </param>
 /// <param name="gateway"> Address of the gateway </param>
 /// <param name="publicKey"> Binary data of the public key </param>
 public IpSecKeyRecord(string name, int timeToLive, byte precedence, IpSecGatewayType gatewayType, IpSecAlgorithm algorithm, string gateway, byte[] publicKey)
     : base(name, RecordType.IpSecKey, RecordClass.INet, timeToLive)
 {
     Precedence  = precedence;
     GatewayType = gatewayType;
     Algorithm   = algorithm;
     Gateway     = gateway ?? String.Empty;
     PublicKey   = publicKey ?? new byte[] { };
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new instance of the IpSecKeyRecord class
 /// </summary>
 /// <param name="name"> Name of the record </param>
 /// <param name="timeToLive"> Seconds the record should be cached at most </param>
 /// <param name="precedence"> Precedence of the record </param>
 /// <param name="gatewayType"> Type of gateway </param>
 /// <param name="algorithm"> Algorithm of the key </param>
 /// <param name="gateway"> Address of the gateway </param>
 /// <param name="publicKey"> Binary data of the public key </param>
 public IpSecKeyRecord(string name, int timeToLive, byte precedence, IpSecGatewayType gatewayType, IpSecAlgorithm algorithm, string gateway, byte[] publicKey)
     : base(name, RecordType.IpSecKey, RecordClass.INet, timeToLive)
 {
     this.Precedence = precedence;
     this.GatewayType = gatewayType;
     this.Algorithm = algorithm;
     this.Gateway = gateway ?? String.Empty;
     this.PublicKey = publicKey ?? new byte[] { };
 }
 /// <summary>
 ///   Creates a new instance of the IpSecKeyRecord class
 /// </summary>
 /// <param name="name"> Name of the record </param>
 /// <param name="timeToLive"> Seconds the record should be cached at most </param>
 /// <param name="precedence"> Precedence of the record </param>
 /// <param name="algorithm"> Algorithm of the key </param>
 /// <param name="gateway"> Address of the gateway </param>
 /// <param name="publicKey"> Binary data of the public key </param>
 public IpSecKeyRecord(DomainName name, int timeToLive, byte precedence, IpSecAlgorithm algorithm, IPAddress gateway, byte[] publicKey)
     : base(name, RecordType.IpSecKey, RecordClass.INet, timeToLive)
 {
     Precedence  = precedence;
     GatewayType = (gateway.AddressFamily == AddressFamily.InterNetwork) ? IpSecGatewayType.IpV4 : IpSecGatewayType.IpV6;
     Algorithm   = algorithm;
     Gateway     = gateway.ToString();
     PublicKey   = publicKey ?? new byte[] { };
 }
 /// <summary>
 ///   Creates a new instance of the IpSecKeyRecord class
 /// </summary>
 /// <param name="name"> Name of the record </param>
 /// <param name="timeToLive"> Seconds the record should be cached at most </param>
 /// <param name="precedence"> Precedence of the record </param>
 /// <param name="algorithm"> Algorithm of the key </param>
 /// <param name="gateway"> Address of the gateway </param>
 /// <param name="publicKey"> Binary data of the public key </param>
 public IpSecKeyRecord(DomainName name, int timeToLive, byte precedence, IpSecAlgorithm algorithm, DomainName gateway, byte[] publicKey)
     : base(name, RecordType.IpSecKey, RecordClass.INet, timeToLive)
 {
     Precedence  = precedence;
     GatewayType = IpSecGatewayType.Domain;
     Algorithm   = algorithm;
     Gateway     = (gateway ?? DomainName.Root).ToString();
     PublicKey   = publicKey ?? new byte[] { };
 }
		/// <summary>
		///   Creates a new instance of the IpSecKeyRecord class
		/// </summary>
		/// <param name="name"> Name of the record </param>
		/// <param name="timeToLive"> Seconds the record should be cached at most </param>
		/// <param name="precedence"> Precedence of the record </param>
		/// <param name="algorithm"> Algorithm of the key </param>
		/// <param name="gateway"> Address of the gateway </param>
		/// <param name="publicKey"> Binary data of the public key </param>
		public IpSecKeyRecord(DomainName name, int timeToLive, byte precedence, IpSecAlgorithm algorithm, IPAddress gateway, byte[] publicKey)
			: base(name, RecordType.IpSecKey, RecordClass.INet, timeToLive)
		{
			Precedence = precedence;
			GatewayType = (gateway.AddressFamily == AddressFamily.InterNetwork) ? IpSecGatewayType.IpV4 : IpSecGatewayType.IpV6;
			Algorithm = algorithm;
			Gateway = gateway.ToString();
			PublicKey = publicKey ?? new byte[] { };
		}
		/// <summary>
		///   Creates a new instance of the IpSecKeyRecord class
		/// </summary>
		/// <param name="name"> Name of the record </param>
		/// <param name="timeToLive"> Seconds the record should be cached at most </param>
		/// <param name="precedence"> Precedence of the record </param>
		/// <param name="algorithm"> Algorithm of the key </param>
		/// <param name="gateway"> Address of the gateway </param>
		/// <param name="publicKey"> Binary data of the public key </param>
		public IpSecKeyRecord(DomainName name, int timeToLive, byte precedence, IpSecAlgorithm algorithm, DomainName gateway, byte[] publicKey)
			: base(name, RecordType.IpSecKey, RecordClass.INet, timeToLive)
		{
			Precedence = precedence;
			GatewayType = IpSecGatewayType.Domain;
			Algorithm = algorithm;
			Gateway = (gateway ?? DomainName.Root).ToString();
			PublicKey = publicKey ?? new byte[] { };
		}