PeerNameType PeerNameType PeerNameType PeerNameType Enum

定义

定义要创建的 PeerName 的类型。 对等名称可以是安全的,也可以是不安全的。A peer name is either secured or unsecured. 安全的对等名称提供名称所有权证明。A secured peer name provides a proof of ownership of the name. 不安全的对等名称没有关联的标识。An unsecured peer name has no identity associated.

public enum class PeerNameType
public enum PeerNameType
type PeerNameType = 
Public Enum PeerNameType
继承

字段

Secured Secured Secured Secured 0

使用当前用户的标识创建一个安全的 PeerNameCreate a secured PeerName using the identity of current user.

Unsecured Unsecured Unsecured Unsecured 1

使用当前用户的标识创建一个不安全的 PeerNameCreate an unsecured PeerName using the identity of current user.

注解

节点必须有权访问与公钥关联的私钥, 用于创建安全PeerName的私钥, 以证明所有权。A node must have access to the private key associated with the public key, used in creating the secured PeerName, in order to prove ownership. 节点没有与公钥之间的关系。The node does not have a relationship to a public key.

对等名称的格式为:Authority.ClassifierThe format of a peer name is: Authority.Classifier. 的值Authority取决于该名称是安全的对等名称还是不安全的对等名称。The value of Authority depends on whether the name is a secured peer name or an unsecured peer name. 名称Classifier的部分可以设置为包含15个或更少 Unicode 字符 ( null包括终止符) 的任何字符串。The Classifier part of the name can be set to any string that contains 15 or fewer Unicode characters, including the null terminator. 建立对AuthorityClassifier方的和安全级别后, 也可以使用相对名称或主机名来引用对等方。Once the Authority, Classifier and security level of a peer have been established, a peer can also be referred to with a relative name or a host name.

只有所有者或对等主机才能使用PNRP 命名空间提供程序 API注册安全对等名称。Only the owner, or peer host, can register a secure peer name with the PNRP Namespace Provider API. 任何节点都可以声明对任何不PeerName安全的进行所有权。Any node can claim ownership to any unsecured PeerName.

注意使用受保护PeerName的并不能确保网络应用程序的总体安全性。Note Using a secured PeerName does not ensure the overall security of a networking application. 应用程序的安全性是视具体实现而定的。Security of the application is implementation-dependent.

适用于

另请参阅