public class CertificateSerialNumber
extends java.lang.Object
implements com.tencent.kona.sun.security.util.DerEncoder
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
| Constructor and Description |
|---|
CertificateSerialNumber(java.math.BigInteger num)
Default constructor for the certificate attribute.
|
CertificateSerialNumber(com.tencent.kona.sun.security.util.DerInputStream in)
Create the object, decoding the values from the passed DER stream.
|
CertificateSerialNumber(com.tencent.kona.sun.security.util.DerValue val)
Create the object, decoding the values from the passed DerValue.
|
CertificateSerialNumber(java.io.InputStream in)
Create the object, decoding the values from the passed stream.
|
CertificateSerialNumber(int num)
Default constructor for the certificate attribute.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(com.tencent.kona.sun.security.util.DerOutputStream out)
Encode the serial number in DER form to the stream.
|
SerialNumber |
getSerial() |
static CertificateSerialNumber |
newRandom64bit(java.util.Random rand)
Generates a new random serial number.
|
java.lang.String |
toString()
Return the serial number as user readable string.
|
public static final java.lang.String NAME
public CertificateSerialNumber(java.math.BigInteger num)
num - the serial number for the certificate.public CertificateSerialNumber(int num)
num - the serial number for the certificate.public CertificateSerialNumber(com.tencent.kona.sun.security.util.DerInputStream in)
throws java.io.IOException
in - the DerInputStream to read the serial number from.java.io.IOException - on decoding errors.public CertificateSerialNumber(java.io.InputStream in)
throws java.io.IOException
in - the InputStream to read the serial number from.java.io.IOException - on decoding errors.public CertificateSerialNumber(com.tencent.kona.sun.security.util.DerValue val)
throws java.io.IOException
val - the DER encoded value.java.io.IOException - on decoding errors.public java.lang.String toString()
toString in class java.lang.Objectpublic void encode(com.tencent.kona.sun.security.util.DerOutputStream out)
encode in interface com.tencent.kona.sun.security.util.DerEncoderout - the DerOutputStream to marshal the contents to.public SerialNumber getSerial()
public static CertificateSerialNumber newRandom64bit(java.util.Random rand)