Stay organized with collections
Save and categorize content based on your preferences.
CodeSigner
class CodeSigner : Serializable
This class encapsulates information about a code signer. It is immutable.
Summary
Public constructors |
Constructs a CodeSigner object.
|
Public methods |
Boolean |
Tests for equality between the specified object and this code signer.
|
CertPath! |
Returns the signer's certificate path.
|
Timestamp! |
Returns the signature timestamp.
|
Int |
Returns the hash code value for this code signer.
|
String |
Returns a string describing this code signer.
|
Public constructors
CodeSigner
CodeSigner(
signerCertPath: CertPath!,
timestamp: Timestamp!)
Constructs a CodeSigner object.
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. |
Exceptions |
java.lang.NullPointerException |
if signerCertPath is null . |
Public methods
equals
fun equals(other: Any?): Boolean
Tests for equality between the specified object and this code signer. Two code signers are considered equal if their signer certificate paths are equal and if their timestamps are equal, if present in both.
Parameters |
obj |
the object to test for equality with this object. |
Return |
Boolean |
true if the objects are considered equal, false otherwise. |
getSignerCertPath
fun getSignerCertPath(): CertPath!
Returns the signer's certificate path.
getTimestamp
fun getTimestamp(): Timestamp!
Returns the signature timestamp.
Return |
Timestamp! |
The timestamp or null if none is present. |
hashCode
fun hashCode(): Int
Returns the hash code value for this code signer. The hash code is generated using the signer's certificate path and the timestamp, if present.
Return |
Int |
a hash code value for this code signer. |
toString
fun toString(): String
Returns a string describing this code signer.
Return |
String |
A string comprising the signer's certificate and a timestamp, if present. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# CodeSigner\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCodeSigner\n==========\n\n```\nclass CodeSigner : Serializable\n```\n\n|---|-------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.security.CodeSigner](#) |\n\nThis class encapsulates information about a code signer. It is immutable.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [CodeSigner](#CodeSigner(java.security.cert.CertPath,%20java.security.Timestamp))`(`signerCertPath:` `[CertPath](/reference/kotlin/java/security/cert/CertPath)!`, `timestamp:` `[Timestamp](/reference/kotlin/java/security/Timestamp)!`)` Constructs a CodeSigner object. |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` Tests for equality between the specified object and this code signer. |\n| [CertPath](/reference/kotlin/java/security/cert/CertPath)! | [getSignerCertPath](#getSignerCertPath())`()` Returns the signer's certificate path. |\n| [Timestamp](/reference/kotlin/java/security/Timestamp)! | [getTimestamp](#getTimestamp())`()` Returns the signature timestamp. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` Returns the hash code value for this code signer. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` Returns a string describing this code signer. |\n\nPublic constructors\n-------------------\n\n### CodeSigner\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nCodeSigner(\n signerCertPath: CertPath!, \n timestamp: Timestamp!)\n```\n\nConstructs a CodeSigner object.\n\n| Parameters ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| `signerCertPath` | [CertPath](/reference/kotlin/java/security/cert/CertPath)!: The signer's certificate path. It must not be `null`. |\n| `timestamp` | [Timestamp](/reference/kotlin/java/security/Timestamp)!: A signature timestamp. If `null` then no timestamp was generated for the signature. |\n\n| Exceptions ||\n|----------------------------------|--------------------------------|\n| `java.lang.NullPointerException` | if `signerCertPath` is `null`. |\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun equals(other: Any?): Boolean\n```\n\nTests for equality between the specified object and this code signer. Two code signers are considered equal if their signer certificate paths are equal and if their timestamps are equal, if present in both.\n\n| Parameters ||\n|-------|---------------------------------------------------|\n| `obj` | the object to test for equality with this object. |\n\n| Return ||\n|------------------------------------------------------------------------------------|------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if the objects are considered equal, false otherwise. |\n\n### getSignerCertPath\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getSignerCertPath(): CertPath!\n```\n\nReturns the signer's certificate path.\n\n| Return ||\n|------------------------------------------------------------|---------------------|\n| [CertPath](/reference/kotlin/java/security/cert/CertPath)! | A certificate path. |\n\n### getTimestamp\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getTimestamp(): Timestamp!\n```\n\nReturns the signature timestamp.\n\n| Return ||\n|---------------------------------------------------------|---------------------------------------------|\n| [Timestamp](/reference/kotlin/java/security/Timestamp)! | The timestamp or `null` if none is present. |\n\n### hashCode\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hashCode(): Int\n```\n\nReturns the hash code value for this code signer. The hash code is generated using the signer's certificate path and the timestamp, if present.\n\n| Return ||\n|----------------------------------------------------------------------------|-----------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this code signer. |\n\n### toString\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun toString(): String\n```\n\nReturns a string describing this code signer.\n\n| Return ||\n|----------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | A string comprising the signer's certificate and a timestamp, if present. |"]]