bees.core.security
Class PublicKey
java.lang.Object
|
+--bees.core.Capability
|
+--bees.core.security.KeySpec
|
+--bees.core.security.PublicKeySpec
|
+--bees.core.security.PublicKey
- All Implemented Interfaces:
- CapabilitySpec, edu.utah.janosvm.kit.comm.jsi.JSIHandler
- public final class PublicKey
- extends PublicKeySpec
- implements edu.utah.janosvm.kit.comm.jsi.JSIHandler
A PublicKey capability wraps a java.security.PublicKey object. This makes
it possible to pass the object to untrusted code without leaking the key
material.
Constructor Summary |
PublicKey()
Construct an empty PublicKey capability. |
Method Summary |
protected void |
fromBytes(byte[] flattened)
Bind this capability to the given object. |
byte[] |
getEncoded()
|
TypeID |
getFingerPrint()
|
void |
getSuites(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
|
void |
handleMessage(edu.utah.janosvm.kit.comm.jsi.JSIHandlerContext jhc,
edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
|
edu.utah.janosvm.kit.comm.jsi.JSIHandler |
resolveSpecifier(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm,
edu.utah.janosvm.kit.comm.jsi.JSIPair jp)
|
byte[] |
toBytes()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
READ_ENCODED_PERMISSION
public static final Permission READ_ENCODED_PERMISSION
- Permission to read the encoded version of this key.
DEFAULT_PERMISSIONS
public static final PermissionSet DEFAULT_PERMISSIONS
- The default permissions for a new PublicKey capability.
PublicKey
public PublicKey()
- Construct an empty PublicKey capability.
fromBytes
protected final void fromBytes(byte[] flattened)
throws java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException,
java.lang.Exception
- Description copied from class:
Capability
- Bind this capability to the given object.
- Overrides:
fromBytes
in class Capability
- See Also:
Capability.fromBytes(byte[])
toBytes
public byte[] toBytes()
- Overrides:
toBytes
in class PublicKeySpec
- Returns:
- The capability material for this key.
getEncoded
public byte[] getEncoded()
- Returns:
- The encoded key material for this key.
getFingerPrint
public TypeID getFingerPrint()
- Returns:
- The finger print for this key.
resolveSpecifier
public edu.utah.janosvm.kit.comm.jsi.JSIHandler resolveSpecifier(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm,
edu.utah.janosvm.kit.comm.jsi.JSIPair jp)
- Specified by:
resolveSpecifier
in interface edu.utah.janosvm.kit.comm.jsi.JSIHandler
- See Also:
JSIHandler.resolveSpecifier(JSIMessage, JSIPair)
handleMessage
public void handleMessage(edu.utah.janosvm.kit.comm.jsi.JSIHandlerContext jhc,
edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
- Specified by:
handleMessage
in interface edu.utah.janosvm.kit.comm.jsi.JSIHandler
- See Also:
JSIHandler.handleMessage(JSIHandlerContext, JSIMessage)
getSuites
public void getSuites(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
- Specified by:
getSuites
in interface edu.utah.janosvm.kit.comm.jsi.JSIHandler
- See Also:
JSIHandler.getSuites(JSIMessage)
toString
public java.lang.String toString()
- Overrides:
toString
in class PublicKeySpec
- See Also:
Object.toString()
This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/