EncryptedTopic
class EncryptedTopic
kotlin.Any | |
↳ | android.adservices.topics.EncryptedTopic |
Encrypted form of android.adservices.topics.Topic
. This object will be used to return encrypted topic cipher text along with necessary fields required to decrypt it.
Decryption of EncryptedTopic#getEncryptedTopic()
should give json string for Topic
. Example of decrypted json string: { "taxonomy_version": 5, "model_version": 2, "topic_id": 10010 }
Decryption of cipher text is expected to happen on the server with the corresponding algorithm and private key for the public key EncryptedTopic#getKeyIdentifier()
}.
Detailed steps on decryption can be found on Developer Guide.
Summary
Public constructors | |
---|---|
EncryptedTopic(encryptedTopic: ByteArray, keyIdentifier: String, encapsulatedKey: ByteArray) Creates encrypted version of the |
Public methods | |
---|---|
Boolean | |
ByteArray |
Returns the encapsulated key generated during HPKE setup. |
ByteArray |
Returns encrypted bytes for the JSON version of the |
String |
Returns key identifier for the used encryption key. |
Int |
hashCode() |
String |
toString() |
Public constructors
EncryptedTopic
EncryptedTopic(
encryptedTopic: ByteArray,
keyIdentifier: String,
encapsulatedKey: ByteArray)
Creates encrypted version of the Topic
object.
Parameters | |
---|---|
encryptedTopic |
ByteArray: byte array cipher text containing encrypted Topic json string. This value cannot be null . |
keyIdentifier |
String: key used to identify the public key used for encryption. This value cannot be null . |
encapsulatedKey |
ByteArray: encapsulated key generated during HPKE setup. This value cannot be null . |
Public methods
equals
fun equals(other: Any?): Boolean
Parameters | |
---|---|
obj |
the reference object with which to compare. |
Return | |
---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getEncapsulatedKey
fun getEncapsulatedKey(): ByteArray
Returns the encapsulated key generated during HPKE setup.
Return | |
---|---|
ByteArray |
This value cannot be null . |
getEncryptedTopic
fun getEncryptedTopic(): ByteArray
Returns encrypted bytes for the JSON version of the Topic
object as cipher text.
Return | |
---|---|
ByteArray |
This value cannot be null . |
getKeyIdentifier
fun getKeyIdentifier(): String
Returns key identifier for the used encryption key.
Return | |
---|---|
String |
This value cannot be null . |
toString
fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |