org.ccnx.ccn.profiles.security.KeyProfile Class Reference

The Key profile handles low-level functions regarding representing keys in content and content names. More...

List of all members.

Static Public Member Functions

static byte[] keyIDToNameComponent (byte[] keyID)
 This builds a name component which refers to the digest of a key (of any type), as generated by the caller, formatted in a standard way (e.g.
static String keyIDToNameComponentAsString (PublisherPublicKeyDigest keyID)
 Helper method to return key ID name component as a string.
static String keyIDToNameComponentAsString (byte[] keyID)
 Helper method to return key ID name component as a string.
static byte[] keyIDToNameComponent (PublisherPublicKeyDigest keyToName)
 This generates a name component which refers to the digest of a public key, formatted in a standard way (e.g.
static ContentName keyName (ContentName parent, PublisherPublicKeyDigest keyToName)
 This creates a ContentName whose last component represents the digest of a public key.
static ContentName keyName (ContentName parent, byte[] keyID)
 This creates a ContentName whose last component represents the digest of a key.
static byte[] getKeyIDFromNameComponent (byte[] childName)
 Get the target keyID from a name component.
static boolean isKeyNameComponent (byte[] wnkNameComponent)
 Returns whether a specified name component is a key id name component.

Static Public Attributes

static final byte[] KEY_NAME_COMPONENT = ContentName.componentParseNative("KEY")
static final byte[] KEYS_NAME_COMPONENT = ContentName.componentParseNative("KEYS")
static final CommandMarker KEY_NAME_COMPONENT_MARKER

Detailed Description

The Key profile handles low-level functions regarding representing keys in content and content names.

This allows us to provide a standard form for referring to public keys in names, among other things.


Member Function Documentation

static byte [] org.ccnx.ccn.profiles.security.KeyProfile.getKeyIDFromNameComponent ( byte[]  childName  )  [static]

Get the target keyID from a name component.

Parameters:
childName the name component
Returns:
the keyID
Exceptions:
IOException 
static boolean org.ccnx.ccn.profiles.security.KeyProfile.isKeyNameComponent ( byte[]  wnkNameComponent  )  [static]

Returns whether a specified name component is a key id name component.

Parameters:
wnkNameComponent the name component
Returns:
static byte [] org.ccnx.ccn.profiles.security.KeyProfile.keyIDToNameComponent ( PublisherPublicKeyDigest  keyToName  )  [static]

This generates a name component which refers to the digest of a public key, formatted in a standard way (e.g.

with marker prefixes if necessary and so on).

Parameters:
keyToName The key to include in the name component.
Returns:
the binary name component
static byte [] org.ccnx.ccn.profiles.security.KeyProfile.keyIDToNameComponent ( byte[]  keyID  )  [static]

This builds a name component which refers to the digest of a key (of any type), as generated by the caller, formatted in a standard way (e.g.

marker prefixes if necessary). This makes it easier to write code that writes and parses names with key identifiers as name components.

Parameters:
keyID The (digest) identifier of the key to be referred to.
Returns:
The resulting name component.
static ContentName org.ccnx.ccn.profiles.security.KeyProfile.keyName ( ContentName  parent,
byte[]  keyID 
) [static]

This creates a ContentName whose last component represents the digest of a key.

Parameters:
parent the parent (prefix) to use for this content name; if null, the name will contain only the key ID component.
keyID the key ID to refer to in the next name component.
Returns:
the resulting name
static ContentName org.ccnx.ccn.profiles.security.KeyProfile.keyName ( ContentName  parent,
PublisherPublicKeyDigest  keyToName 
) [static]

This creates a ContentName whose last component represents the digest of a public key.

Parameters:
parent the parent (prefix) to use for this content name; if null, the name will contain only the key ID component.
keyToName the key to refer to in the next name component.
Returns:
the resulting name

Member Data Documentation

final CommandMarker org.ccnx.ccn.profiles.security.KeyProfile.KEY_NAME_COMPONENT_MARKER [static]
Initial value:
 
                CommandMarker.commandMarker(CommandMarker.MARKER_NAMESPACE, "K")

The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:48 2011 for Content-Centric Networking in Java by  doxygen 1.6.3