Represents a handle for an instance of tox_dns3.
Inheritance: SharpTox.Core.SafeHandleZeroOrMinusOneIsInvalid
Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of tox dns3.
        /// </summary>
        /// <param name="public_key"></param>
        public ToxDns(string public_key)
        {
            tox_dns3 = ToxDnsFunctions.New(ToxTools.StringToHexBin(public_key));

            if (tox_dns3 == null || tox_dns3.IsInvalid)
                throw new Exception("Could not create a new tox_dns3 instance with the provided public_key");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of tox dns3.
        /// </summary>
        /// <param name="publicKey">The public key that this instance of toxdns should be initialized with.</param>
        public ToxDns(ToxKey publicKey)
        {
            _toxDns3 = ToxDnsFunctions.New(publicKey.GetBytes());

            if (_toxDns3 == null || _toxDns3.IsInvalid)
                throw new Exception("Could not create a new tox_dns3 instance with the provided publicKey");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of tox dns3.
        /// </summary>
        /// <param name="publicKey"></param>
        public ToxDns(string publicKey)
        {
            _toxDns3 = ToxDnsFunctions.New(ToxTools.StringToHexBin(publicKey));

            if (_toxDns3 == null || _toxDns3.IsInvalid)
            {
                throw new Exception("Could not create a new tox_dns3 instance with the provided public_key");
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of tox dns3.
        /// </summary>
        /// <param name="publicKey">The public key that this instance of toxdns should be initialized with.</param>
        public ToxDns(ToxKey publicKey)
        {
            _toxDns3 = ToxDnsFunctions.New(publicKey.GetBytes());

            if (_toxDns3 == null || _toxDns3.IsInvalid)
            {
                throw new Exception("Could not create a new tox_dns3 instance with the provided publicKey");
            }
        }
Ejemplo n.º 5
0
 internal static extern int DecryptDns3TXT(ToxDnsHandle dns3Object, byte[] toxId, byte[] idRecord, uint idRecordLenght, uint requestId);
Ejemplo n.º 6
0
 internal static extern int GenerateDns3String(ToxDnsHandle dns3Object, byte[] str, ushort strMaxLength, ref uint requestId, byte[] name, byte nameLength);
Ejemplo n.º 7
0
 internal static extern int GenerateDns3String(ToxDnsHandle dns3Object, byte[] str, ushort strMaxLength, ref uint requestId, byte[] name, byte nameLength);
Ejemplo n.º 8
0
 internal static extern int DecryptDns3TXT(ToxDnsHandle dns3Object, byte[] toxId, byte[] idRecord, uint idRecordLenght, uint requestId);
Ejemplo n.º 9
0
 public static extern int DecryptDns3TXT(ToxDnsHandle dns3_object, byte[] tox_id, byte[] id_record, uint id_record_len, uint request_id);
Ejemplo n.º 10
0
 public static extern int GenerateDns3String(ToxDnsHandle dns3_object, byte[] str, ushort str_max_len, ref uint request_id, byte[] name, byte name_len);