public Trust(TrustLevel level, byte amount) { this._amount = amount; this._level = level; }
public override void FromOSD(OSDMap map) { TrustLevel = (TrustLevel)map["TrustLevel"].AsInteger(); Certificate = new IWCCertificate(); Certificate.FromOSD((OSDMap)OSDParser.DeserializeJson(map["Certificate"].AsString())); URL = map["URL"].AsString(); }
public override void FromOSD(OSDMap map) { SessionHash = map["SessionHash"].AsString(); ValidUntil = map["ValidUntil"].AsDate(); SecureUrls = (OSDMap)map["SecureUrls"]; if(map.ContainsKey("TrustLevel")) TrustLevel = (TrustLevel)map["TrustLevel"].AsInteger(); }
/// <summary> /// Ctor /// </summary> /// <param name="data">The data payload</param> /// <param name="relayState">The associated relay state.</param> /// <param name="trustLevel">Level of trust that can be put in data. /// Does not care about any signature included in the data.</param> public UnbindResult(XmlElement data, string relayState, TrustLevel trustLevel) { Data = data; RelayState = relayState; TrustLevel = trustLevel; }
public void Initialize(IConfigSource source, IRegistryCore registry) { m_config = source.Configs["AuroraInterWorldConnectors"]; if (m_config != null) { m_Enabled = m_config.GetBoolean("Enabled", false); m_allowUntrustedConnections = m_config.GetBoolean("AllowUntrustedConnections", m_allowUntrustedConnections); m_untrustedConnectionsDefaultTrust = (TrustLevel)Enum.Parse(typeof(TrustLevel), m_config.GetString("UntrustedConnectionsDefaultTrust", m_untrustedConnectionsDefaultTrust.ToString())); } m_registry = registry; }
public Container(T value, TrustLevel trustLevel) { Value = value; TrustLevel = trustLevel; }
/// <summary> /// Parses a line of the format: /// <code>uid:u::::1138787426::64E94BC187C9B38AD5070B2327C4211970D90639::David Paleino <[email protected]>:</code> /// and updates its fields. /// </summary> /// <param name="Line"> /// A <see cref="System.String"/> /// </param> public void ParseLine(string Line) { this._type = Utils.GetRecordType(Utils.GetField(Line, 0)); this._trust = Utils.GetTrustLevel(Utils.GetField(Line, 1)); // TODO: these fields are seconds from the Epoch, Convert.ToDateTime() // doesn't recognize them. this._creationDate = Utils.GetField(Line, 5); this._expirationDate = Utils.GetField(Line, 6); this._hash = Utils.GetField(Line, 7); // these are UID-specific (i.e. not UAT) if (this.Type == RecordType.UserId) { Hashtable tbl = Utils.ParseUsername(Utils.GetField(Line, 9)); this._name = tbl["name"].ToString(); this._comment = tbl["comment"].ToString(); this._email = tbl["email"].ToString(); } else { // TODO: parse Utils.GetField(Line, 9) for UAT. // TODO: get the image saved in UAT (or any other data it might // contain). /* * Format of the "--attribute-fd" output * ===================================== * * When --attribute-fd is set, during key listings (--list-keys, * --list-secret-keys) GnuPG dumps each attribute packet to the file * descriptor specified. --attribute-fd is intended for use with * --status-fd as part of the required information is carried on the * ATTRIBUTE status tag (see above). * * The contents of the attribute data is specified by 2440bis, but for * convenience, here is the Photo ID format, as it is currently the only * attribute defined: * * Byte 0-1: The length of the image header. Due to a historical * accident (i.e. oops!) back in the NAI PGP days, this is * a little-endian number. Currently 16 (0x10 0x00). * Byte 2: The image header version. Currently 0x01. * Byte 3: Encoding format. 0x01 == JPEG. * Byte 4-15: Reserved, and currently unused. * * All other data after this header is raw image (JPEG) data. */ } }
// Methods public void Add(TrustLevel trustLevel) { }
/// <summary> /// Stores the fields from the given line into appropriate variables. /// </summary> /// <param name="line"> /// A <see cref="System.String"/> /// </param> private void ParseLine(string line) { // This is the format we receive: // pub:u:1024:17:E6AA90171392B174:1138786427:::u:::scaESCA: // sub:u:4096:1:BB45ABF7A71D5481:1203325654::::::e: this._type = Utils.GetRecordType(Utils.GetField(line, 0)); this._trust = Utils.GetTrustLevel(Utils.GetField(line, 1)); this._bits = Convert.ToInt32(Utils.GetField(line, 2)); this._algorithm = Utils.GetAlgorithm(Convert.ToInt32(Utils.GetField(line, 3))); this._id = Utils.GetField(line, 4); // FIXME: with --fixed-list-mode, the dates are given as seconds // from Epoch: these are not recognized by Convert.ToDateTime() this._creationDate = Utils.GetField(line, 5); this._expirationDate = Utils.GetField(line, 6); if (this._type == RecordType.PublicKey) { this._ownerTrust = Utils.GetTrustLevel(Utils.GetField(line, 8)); } // TODO: try to parse also the usage flags (scaESCA and e above) }
public void Remove(TrustLevel trustLevel) { }
public void Set(int index, TrustLevel trustLevel) { }
public Trust(TrustLevel level, byte amount) { this._amount = amount; this._level = level; }
/// <summary> /// Ctor /// </summary> /// <param name="data">The data payload</param> /// <param name="relayState">The associated relay state.</param> /// <param name="trustLevel">Level of trust that can be put in data. /// Does not care about any signature included in the data.</param> public UnbindResult(XmlElement data, string relayState, TrustLevel trustLevel) { Data = data; RelayState = relayState; TrustLevel = trustLevel; }
public override int GetHashCode() { return(Clsid.GetHashCode() ^ Name.GetSafeHashCode() ^ DllPath.GetSafeHashCode() ^ Server.GetSafeHashCode() ^ ActivationType.GetHashCode() ^ TrustLevel.GetHashCode() ^ Permissions.GetSafeHashCode() ^ Threading.GetHashCode() ^ ActivateInSharedBroker.GetHashCode()); }
public void ApplyTrustLevel(IList<NetworkComputationResultEntry> results, int expectedIndex) { foreach (NetworkComputationResultEntry entry in results) { if (trustLevelDict.ContainsKey(entry.EventClass)) { trustLevelDict[entry.EventClass].Total++; trustLevelDict[entry.EventClass].SuccessCount += expectedIndex == 0 ? 1 : 0; } else { TrustLevel level = new TrustLevel(expectedIndex == 0 ? 1 : 0, 1); trustLevelDict.Add(entry.EventClass, level); } } }
public Container(T value, TrustLevel trustLevel) { this.value = value; this.trustLevel = trustLevel; }
public ConnectionIdentifier(Dictionary<string, object> KVP) { ConnectionPath = KVP["ConnectionPath"].ToString(); SessionHash = KVP["SessionHash"].ToString(); ForeignPassword = KVP["ForeignPassword"].ToString(); ForeignURL = ""; TrustLevel = 0; }
public Trust(TrustLevel level, byte amount) { Amount = amount; Level = level; }