edu.vt.middleware.crypt.x509.types
Class KeyUsage
java.lang.Object
edu.vt.middleware.crypt.x509.types.BitString
edu.vt.middleware.crypt.x509.types.KeyUsage
public class KeyUsage
- extends BitString
Representation of the KeyUsage type defined in section 4.2.1.3
of RFC 2459.
- Version:
- $Revision: 424 $
- Author:
- Middleware Services
KeyUsage
public KeyUsage(byte[] bitString)
- Creates a new instance with the given bit string, where each bit is one of
the constants defined in the
KeyUsageBits enumeration.
- Parameters:
bitString - Octets making up key usage bit string.
KeyUsage
public KeyUsage(int flags)
- Creates a new instance from OR-ing
KeyUsageBits bitmask values.
- Parameters:
flags - Bit mask created by OR-ing the bitmask of KeyUsageBits enum values together, e.g.
KeyUsageBits.DigitalSignature.getMask()|KeyUsageBits.KeyCertSign.getMask()
KeyUsage
public KeyUsage(KeyUsageBits[] bits)
- Creates a new instance that has all the given
KeyUsageBits set.
- Parameters:
bits - Array of KeyUsageBits describing all key usage bits
to be set.
getUses
public Collection<KeyUsageBits> getUses()
- Gets a collection of the bits set for this instance.
- Returns:
- Collection of
KeyUsageBits items representing the bits
that are set for this instance.
toString
public String toString()
- Overrides:
toString in class Object
- Returns:
- List of all key usage bits set in this object, e.g.
[DigitalSignature, KeyCertSign].
Copyright © 2003-2011 Virginia Tech. All Rights Reserved.