Home » openjdk-7 » javax » crypto » [javadoc | source]
javax.crypto
final class: CryptoPermissions [javadoc | source]
java.lang.Object
   java.security.PermissionCollection
      javax.crypto.CryptoPermissions

All Implemented Interfaces:
    java$io$Serializable, Serializable

This class contains CryptoPermission objects, organized into PermissionCollections according to algorithm names.

When the add method is called to add a CryptoPermission, the CryptoPermission is stored in the appropriate PermissionCollection. If no such collection exists yet, the algorithm name associated with the CryptoPermission object is determined and the newPermissionCollection method is called on the CryptoPermission or CryptoAllPermission class to create the PermissionCollection and add it to the Permissions object.

Constructor:
 CryptoPermissions() 
Method from javax.crypto.CryptoPermissions Summary:
add,   elements,   getMinimum,   getPermissionCollection,   implies,   isEmpty,   load
Methods from java.security.PermissionCollection:
add,   elements,   implies,   isReadOnly,   setReadOnly,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.crypto.CryptoPermissions Detail:
 public  void add(Permission permission) 
    Adds a permission object to the PermissionCollection for the algorithm returned by (CryptoPermission)permission.getAlgorithm(). This method creates a new PermissionCollection object (and adds the permission to it) if an appropriate collection does not yet exist.

 public Enumeration elements() 
    Returns an enumeration of all the Permission objects in all the PermissionCollections in this CryptoPermissions object.
 CryptoPermissions getMinimum(CryptoPermissions other) 
    Returns a CryptoPermissions object which represents the minimum of the specified CryptoPermissions object and this CryptoPermissions object.
 PermissionCollection getPermissionCollection(String alg) 
    Returns the PermissionCollection for the specified algorithm. Returns null if there isn't such a PermissionCollection.
 public boolean implies(Permission permission) 
    Checks if this object's PermissionCollection for permissons of the specified permission's algorithm implies the specified permission. Returns true if the checking succeeded.
 boolean isEmpty() 
    Returns true if this CryptoPermissions object doesn't contain any CryptoPermission objects; otherwise, returns false.
  void load(InputStream in) throws IOException, ParsingException 
    Populates the crypto policy from the specified InputStream into this CryptoPermissions object.