Bees v0.5.0 API

bees.core.security
Class SecretKey

java.lang.Object
  |
  +--bees.core.Capability
        |
        +--bees.core.security.KeySpec
              |
              +--bees.core.security.SecretKeySpec
                    |
                    +--bees.core.security.SecretKey
All Implemented Interfaces:
CapabilitySpec

public final class SecretKey
extends SecretKeySpec

A SecretKey capability wraps a javax.crypto.SecretKey object. This makes it possible to pass the object to untrusted code without leaking the key material.


Field Summary
static PermissionSet DEFAULT_PERMISSIONS
          The default permissions for a new SecretKey capability.
 
Fields inherited from class bees.core.Capability
DELETE_PERMISSION, id, INVALID_ID
 
Constructor Summary
SecretKey()
          Construct an empty SecretKey.
 
Method Summary
protected  void fromBytes(byte[] flattened)
          Bind this capability to the given object.
 byte[] toBytes()
           
 java.lang.String toString()
           
 
Methods inherited from class bees.core.security.SecretKeySpec
createKey, getAlgorithm, revoke
 
Methods inherited from class bees.core.security.KeySpec
getFactory, specFromBytes
 
Methods inherited from class bees.core.Capability
checkPermission, clear, clonePermission, deleteCapability, equals, fromBytes, revokedPermission, revokePermission, revokePermissions, valid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PERMISSIONS

public static final PermissionSet DEFAULT_PERMISSIONS
The default permissions for a new SecretKey capability.
Constructor Detail

SecretKey

public SecretKey()
Construct an empty SecretKey.
Method Detail

fromBytes

protected void fromBytes(byte[] flattened)
                  throws 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 SecretKeySpec
See Also:
bees.core.security.KeySpec#toBytes()

toString

public java.lang.String toString()
Overrides:
toString in class SecretKeySpec
See Also:
Object.toString()

Bees v0.5.0 API

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/