Methods Summary |
---|
void | encode(DEROutputStream out)
char[] c = string.toCharArray();
byte[] b = new byte[c.length * 2];
for (int i = 0; i != c.length; i++)
{
b[2 * i] = (byte)(c[i] >> 8);
b[2 * i + 1] = (byte)c[i];
}
out.writeEncoded(BMP_STRING, b);
|
public boolean | equals(java.lang.Object o)
if (!(o instanceof DERBMPString))
{
return false;
}
DERBMPString s = (DERBMPString)o;
return this.getString().equals(s.getString());
|
public static org.bouncycastle.asn1.DERBMPString | getInstance(java.lang.Object obj)return a BMP String from the given object.
if (obj == null || obj instanceof DERBMPString)
{
return (DERBMPString)obj;
}
if (obj instanceof ASN1OctetString)
{
return new DERBMPString(((ASN1OctetString)obj).getOctets());
}
if (obj instanceof ASN1TaggedObject)
{
return getInstance(((ASN1TaggedObject)obj).getObject());
}
throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
|
public static org.bouncycastle.asn1.DERBMPString | getInstance(ASN1TaggedObject obj, boolean explicit)return a BMP String from a tagged object.
return getInstance(obj.getObject());
|
public java.lang.String | getString()
return string;
|
public int | hashCode()
return this.getString().hashCode();
|