Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
fix(keypair.ex): added exportable params
Browse files Browse the repository at this point in the history
  • Loading branch information
madclaws committed Oct 28, 2023
1 parent 4d6f823 commit 6bffb14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ex_ucan/plugins/ed25519/keypair.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6bffb14

Please sign in to comment.