x25519JwkFromX25519PublicKey function

Map<String, dynamic> x25519JwkFromX25519PublicKey(
  1. List<int> publicKey
)

Converts a X25519 public key to a JWK (JSON Web Key) representation. Returns the JWK.

Implementation

Map<String, dynamic> x25519JwkFromX25519PublicKey(List<int> publicKey) {
  final jwk = {
    "kty": "OKP",
    "crv": "X25519",
    "x": base64Url.encode(publicKey),
  };
  return jwk;
}