diff --git a/lib/ex_ucan/plugins/ed25519/keypair.ex b/lib/ex_ucan/plugins/ed25519/keypair.ex index 1cf2812..e7a656e 100644 --- a/lib/ex_ucan/plugins/ed25519/keypair.ex +++ b/lib/ex_ucan/plugins/ed25519/keypair.ex @@ -18,14 +18,14 @@ defmodule ExUcan.Plugins.Ed25519.Keypair do exportable: false ) - @spec create() :: __MODULE__.t() - def create() do + @spec create(boolean()) :: __MODULE__.t() + def create(exportable?) do {pub, priv} = :crypto.generate_key(:eddsa, :ed25519) __MODULE__.__struct__( jwt_alg: "EdDSA", secret_key: priv, public_key: pub, - exportable: false + exportable: exportable? ) end