XdhKeySpec
class XdhKeySpec : EncodedKeySpec
kotlin.Any | ||
↳ | java.security.spec.EncodedKeySpec | |
↳ | android.crypto.hpke.XdhKeySpec |
External Diffie–Hellman (XDH) key spec holding either a public or private key.
Subclasses EncodedKeySpec
using the non-Standard "raw" format. The XdhKeyFactory class utilises this in order to create XDH keys from raw bytes and to return them as an XdhKeySpec allowing the raw key material to be extracted from an XDH key.
Summary
Public constructors | |
---|---|
XdhKeySpec(encoded: ByteArray) Creates an instance of |
Public methods | |
---|---|
Boolean | |
String |
Returns the name of the encoding format associated with this key specification. |
ByteArray |
getKey() Returns the public or private key in its raw format. |
Int |
hashCode() |
Inherited functions | |
---|---|
Public constructors
XdhKeySpec
XdhKeySpec(encoded: ByteArray)
Creates an instance of XdhKeySpec
by passing a public or private key in its raw format.
Parameters | |
---|---|
encoded |
ByteArray: 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. |
getFormat
fun getFormat(): String
Returns the name of the encoding format associated with this key specification.
If the opaque representation of a key (see Key
) can be transformed (see KeyFactory
) into this key specification (or a subclass of it), getFormat
called on the opaque key returns the same value as the getFormat
method of this key specification.
Return | |
---|---|
String |
This value cannot be null . |
getKey
fun getKey(): ByteArray
Returns the public or private key in its raw format.
Return | |
---|---|
ByteArray |
key in its raw format. This value cannot be null . |