Top Description Fields Constructors Methods
org.bouncycastle.crypto

public Class CryptoServicesPermission

extends Permission
Class Inheritance
Imports
java.security.Permission, java.util.HashSet, .Set

Permissions that need to be configured if a SecurityManager is used.

Field Summary

Modifier and TypeField and Description
private final Set<String>
public static final String
CONSTRAINTS

Enable the setting of the constraints.

public static final String
DEFAULT_RANDOM

Enable the setting of the default SecureRandom.

public static final String
GLOBAL_CONFIG

Enable the setting of global configuration properties.

public static final String
THREAD_LOCAL_CONFIG

Enable the setting of thread local configuration properties.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the object we are testing for equality with this object.
obj
)

Implements abstract java.security.Permission.equals.

Checks two Permission objects for equality.

public String
getActions()

Implements abstract java.security.Permission.getActions.

Returns the actions as a String.

public int
hashCode()

Implements abstract java.security.Permission.hashCode.

Returns the hash code value for this Permission object.

public boolean
implies(Permission
the permission to check against.
permission
)

Implements abstract java.security.Permission.implies.

Checks if the specified permission's actions are "implied by" this object's actions.

Inherited from java.security.Permission:
checkGuardgetNamenewPermissionCollectiontoString

Field Detail

actionsback to summary
private final Set<String> actions
CONSTRAINTSback to summary
public static final String CONSTRAINTS

Enable the setting of the constraints.

DEFAULT_RANDOMback to summary
public static final String DEFAULT_RANDOM

Enable the setting of the default SecureRandom.

GLOBAL_CONFIGback to summary
public static final String GLOBAL_CONFIG

Enable the setting of global configuration properties. This permission implies THREAD_LOCAL_CONFIG

THREAD_LOCAL_CONFIGback to summary
public static final String THREAD_LOCAL_CONFIG

Enable the setting of thread local configuration properties.

Constructor Detail

CryptoServicesPermissionback to summary
public CryptoServicesPermission(String name)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Implements abstract java.security.Permission.equals.

Doc from java.security.Permission.equals.

Checks two Permission objects for equality.

Do not use the equals method for making access control decisions; use the implies method.

Parameters
obj:Object

the object we are testing for equality with this object.

Returns:boolean

true if both Permission objects are equivalent.

getActionsback to summary
public String getActions()

Implements abstract java.security.Permission.getActions.

Doc from java.security.Permission.getActions.

Returns the actions as a String. This is abstract so subclasses can defer creating a String representation until one is needed. Subclasses should always return actions in what they consider to be their canonical form. For example, two FilePermission objects created via the following:

  perm1 = new FilePermission(p1,"read,write");
  perm2 = new FilePermission(p2,"write,read");
both return "read,write" when the getActions method is invoked.
Returns:String

the actions of this Permission.

hashCodeback to summary
public int hashCode()

Implements abstract java.security.Permission.hashCode.

Doc from java.security.Permission.hashCode.

Returns the hash code value for this Permission object.

The required hashCode behavior for Permission Objects is the following:

  • Whenever it is invoked on the same Permission object more than once during an execution of a Java application, the hashCode method must consistently return the same integer. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two Permission objects are equal according to the equals method, then calling the hashCode method on each of the two Permission objects must produce the same integer result.
Returns:int

a hash code value for this object.

impliesback to summary
public boolean implies(Permission permission)

Implements abstract java.security.Permission.implies.

Doc from java.security.Permission.implies.

Checks if the specified permission's actions are "implied by" this object's actions.

This must be implemented by subclasses of Permission, as they are the only ones that can impose semantics on a Permission object.

Parameters
permission:Permission

the permission to check against.

Returns:boolean

true if the specified permission is implied by this object, false if not.