Most visited

Recently visited

Added in API level 1

CodeSigner

public final class CodeSigner
extends Object implements Serializable

java.lang.Object
    java.security.CodeSigner


这个类封装了关于代码签名者的信息。 它是不可变的。

摘要(Summary)

Public constructors

CodeSigner(CertPath signerCertPath, Timestamp timestamp)

构造一个CodeSigner对象。

公共方法(Public methods)

boolean equals(Object obj)

测试指定对象和此代码签名者之间的相等性。

CertPath getSignerCertPath()

返回签名者的证书路径。

Timestamp getTimestamp()

返回签名时间戳。

int hashCode()

返回此代码签名者的哈希码值。

String toString()

返回描述此代码签名者的字符串。

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

CodeSigner

Added in API level 1
CodeSigner (CertPath signerCertPath, 
                Timestamp timestamp)

构造一个CodeSigner对象。

参数(Parameters)
signerCertPath CertPath: The signer's certificate path. It must not be null.
timestamp Timestamp: A signature timestamp. If null then no timestamp was generated for the signature.
抛出异常(Throws)
NullPointerException if signerCertPath is null.

公共方法(Public methods)

equals

Added in API level 1
boolean equals (Object obj)

测试指定对象和此代码签名者之间的相等性。 如果两个代码签名者的签名者证书路径相同,并且它们的时间戳相同(如果两者都存在),则两个代码签名者被认为是相等的。

参数(Parameters)
obj Object: the object to test for equality with this object.
返回(Returns)
boolean true if the objects are considered equal, false otherwise.

getSignerCertPath

Added in API level 1
CertPath getSignerCertPath ()

返回签名者的证书路径。

返回(Returns)
CertPath A certificate path.

getTimestamp

Added in API level 1
Timestamp getTimestamp ()

返回签名时间戳。

返回(Returns)
Timestamp The timestamp or null if none is present.

hashCode

Added in API level 1
int hashCode ()

返回此代码签名者的哈希码值。 哈希码是使用签名者的证书路径和时间戳(如果存在)生成的。

返回(Returns)
int a hash code value for this code signer.

toString

Added in API level 1
String toString ()

返回描述此代码签名者的字符串。

返回(Returns)
String A string comprising the signer's certificate and a timestamp, if present.

Hooray!