public class KeyUsageBit
extends java.lang.Object
implements java.io.Serializable
Class that represents a Key Usage Bit Identifier.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME_CRLSIGN
Constant attribute that represents the key usage name 'crlSign'.
|
static java.lang.String |
NAME_DATAENCIPHERMENT
Constant attribute that represents the key usage name 'dataEncipherment'.
|
static java.lang.String |
NAME_DECIPHERONLY
Constant attribute that represents the key usage name 'decipherOnly'.
|
static java.lang.String |
NAME_DIGITALSIGNATURE
Constant attribute that represents the key usage name 'digitalSignature'.
|
static java.lang.String |
NAME_ENCIPHERONLY
Constant attribute that represents the key usage name 'encipherOnly'.
|
static java.lang.String |
NAME_KEYAGREEMENT
Constant attribute that represents the key usage name 'keyAgreement'.
|
static java.lang.String |
NAME_KEYCERTSIGN
Constant attribute that represents the key usage name 'keyCertSign'.
|
static java.lang.String |
NAME_KEYENCIPHERMENT
Constant attribute that represents the key usage name 'keyEncipherment'.
|
static java.lang.String |
NAME_NONREPUDATION
Constant attribute that represents the key usage name 'nonRepudiation'.
|
| Constructor and Description |
|---|
KeyUsageBit(java.lang.String keyUsageName,
boolean keyUsageValue)
Constructor method for the class KeyUsageBit.java.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkCertificate(java.security.cert.X509Certificate cert)
Checks if the input certificate has the KeyUsage set to the same value how this object.
|
java.lang.String |
getName()
Gets the value of the attribute
name. |
boolean |
getValue()
Gets the value of the attribute
value. |
void |
setKeyUsage(java.lang.String keyUsageName,
boolean keyUsageValue)
Sets the Key Usage.
|
public static final java.lang.String NAME_DIGITALSIGNATURE
public static final java.lang.String NAME_NONREPUDATION
public static final java.lang.String NAME_KEYENCIPHERMENT
public static final java.lang.String NAME_DATAENCIPHERMENT
public static final java.lang.String NAME_KEYAGREEMENT
public static final java.lang.String NAME_KEYCERTSIGN
public static final java.lang.String NAME_CRLSIGN
public static final java.lang.String NAME_ENCIPHERONLY
public static final java.lang.String NAME_DECIPHERONLY
public KeyUsageBit(java.lang.String keyUsageName,
boolean keyUsageValue)
keyUsageName - Key Usage name to assign.keyUsageValue - Key usage value to assign.public final java.lang.String getName()
name.name.public final boolean getValue()
value.value.public final void setKeyUsage(java.lang.String keyUsageName,
boolean keyUsageValue)
keyUsageName - Key Usage name to assign.keyUsageValue - Key usage value to assign.public final boolean checkCertificate(java.security.cert.X509Certificate cert)
cert - Certificate X509v3 to check.true if the certificate has the KeyUsage set to the same value how this object,
otherwise false.