Modifier and Type | Field and Description |
---|---|
private static final Pattern | |
private final byte[] | |
private int | |
private String | |
private String |
Access | Constructor and Description |
---|---|
public | PKCS12Attribute(String
the attribute's identifier name, String the attribute's value value)Constructs a PKCS12 attribute from its name and value. |
public | PKCS12Attribute(byte[]
the attribute's ASN.1 DER encoding. It is cloned
to prevent subsequent modification. encoded)Constructs a PKCS12 attribute from its ASN.1 DER encoding. |
Modifier and Type | Method and Description |
---|---|
private byte[] | |
public boolean | Returns: true ifobj is a PKCS12Attribute and
their DER encodings are equal.the comparison object obj)Overrides java. Compares this |
public byte[] | Returns: a clone of the attribute's DER encodingReturns the attribute's ASN.1 DER encoding. |
public String | Returns: the attribute's identifierImplements java. Returns the attribute's ASN.1 Object Identifier represented as a list of dot-separated integers. |
public String | Returns: the attribute value's string encodingImplements java. Returns the attribute's ASN.1 DER-encoded value as a string. |
public int | Returns: the hashcode for thisPKCS12Attribute Overrides java. Returns the hashcode for this |
private void | |
public String | Returns: a name/value pair separated by an 'equals' symbolOverrides java. Returns a string representation of this |
COLON_SEPARATED_HEX_PAIRS | back to summary |
---|---|
private static final Pattern COLON_SEPARATED_HEX_PAIRS |
encoded | back to summary |
---|---|
private final byte[] encoded |
hashValue | back to summary |
---|---|
private int hashValue |
name | back to summary |
---|---|
private String name |
value | back to summary |
---|---|
private String value |
PKCS12Attribute | back to summary |
---|---|
public PKCS12Attribute(String name, String value) Constructs a PKCS12 attribute from its name and value.
The name is an ASN.1 Object Identifier represented as a list of
dot-separated integers.
A string value is represented as the string itself.
A binary value is represented as a string of colon-separated
pairs of hexadecimal digits.
Multivalued attributes are represented as a comma-separated
list of values, enclosed in square brackets. See
A string value will be DER-encoded as an ASN.1 UTF8String and a binary value will be DER-encoded as an ASN.1 Octet String.
|
PKCS12Attribute | back to summary |
---|---|
public PKCS12Attribute(byte[] encoded) Constructs a PKCS12 attribute from its ASN.1 DER encoding. The DER encoding is specified by the following ASN.1 definition: Attribute ::= SEQUENCE { type AttributeType, values SET OF AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY defined by type
|
encode | back to summary |
---|---|
private byte[] encode(ObjectIdentifier type, String[] values) throws IOException |
equals | back to summary |
---|---|
public boolean equals(Object obj) Overrides java. Compares this |
getEncoded | back to summary |
---|---|
public byte[] getEncoded() Returns the attribute's ASN.1 DER encoding.
|
getName | back to summary |
---|---|
public String getName() Implements java. Returns the attribute's ASN.1 Object Identifier represented as a list of dot-separated integers. |
getValue | back to summary |
---|---|
public String getValue() Implements java. Returns the attribute's ASN.1 DER-encoded value as a string.
An ASN.1 DER-encoded value is returned in one of the following
Arrays#toString(java. .
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Returns the hashcode for this
|
parse | back to summary |
---|---|
private void parse(byte[] encoded) throws IOException |
toString | back to summary |
---|---|
public String toString() Overrides java. Returns a string representation of this |