public Key To Bytes
Converts a Jwk public key into its byte array representation.
Return
A ByteArray representing the byte-level information of the provided public key.
Example
val publicKeyBytes = publicKeyToBytes(myJwkPublicKey)
Content copied to clipboard
Note
This function assumes that the provided Jwk contains valid curve and algorithm information. Malformed or invalid Jwk objects may result in exceptions or unexpected behavior.
Throws
IllegalArgumentException If the algorithm or curve in Jwk is not supported or invalid.
Parameters
public Key
A Jwk object representing the public key to be converted.