/// <summary> /// Returns the public key of this server from the certificate file. /// </summary> /// <returns></returns> public static NodePublicKey GetServerPublicKey() { FieldPublicKey key = new FieldPublicKey( GetServerPublicKeyString()); return(NodePublicKey.BuildWith(key)); }
public static NodePublicKey BuildWith(FieldPublicKey Key) { //build fields Dictionary<FieldIdentifier, FieldBase> mutableFields = new Dictionary<FieldIdentifier, FieldBase>(); mutableFields.Add(new FieldIdentifier(m_KeyName), Key); //build children KeyedNodeCollection<NodeBase> mutableChildren = new KeyedNodeCollection<NodeBase>(); //build node NodePublicKey Builder = new NodePublicKey( new ReadOnlyDictionary<FieldIdentifier, FieldBase>(mutableFields), new ReadOnlyCollection<NodeBase>(mutableChildren)); return Builder; }
public static NodePublicKey BuildWith(FieldPublicKey Key) { //build fields Dictionary <FieldIdentifier, FieldBase> mutableFields = new Dictionary <FieldIdentifier, FieldBase>(); mutableFields.Add(new FieldIdentifier(m_KeyName), Key); //build children KeyedNodeCollection <NodeBase> mutableChildren = new KeyedNodeCollection <NodeBase>(); //build node NodePublicKey Builder = new NodePublicKey( new ReadOnlyDictionary <FieldIdentifier, FieldBase>(mutableFields), new ReadOnlyCollection <NodeBase>(mutableChildren)); return(Builder); }
/// <summary> /// Returns the public key of this server from the certificate file. /// </summary> /// <returns></returns> public static NodePublicKey GetServerPublicKey() { FieldPublicKey key = new FieldPublicKey( GetServerPublicKeyString()); return NodePublicKey.BuildWith(key); }