Skip to content

docs: rename secret to salt - #6813

Open
kevinschweikert wants to merge 1 commit into
phoenixframework:mainfrom
kevinschweikert:fix/secret-salt-naming
Open

docs: rename secret to salt#6813
kevinschweikert wants to merge 1 commit into
phoenixframework:mainfrom
kevinschweikert:fix/secret-salt-naming

Conversation

@kevinschweikert

Copy link
Copy Markdown
Contributor

the moduledocs even say that the second argument
is a "cryptographic salt" so we should name the arg as such.

Also verify/4 and sign/4 call it salt

the moduledocs even say that the second argument
is a "cryptographic salt" so we should name the arg
as such.
@SteffenDE

Copy link
Copy Markdown
Member

We take it from plug_crypto (https://plug-crypto.hexdocs.pm/Plug.Crypto.html#decrypt/4), so I guess we should first change it there?

@kevinschweikert

Copy link
Copy Markdown
Contributor Author

Totally! I peeked at the implementation and its even shadowing the actual secret variable

def decrypt(key_base, secret, token, opts)
      when is_binary(key_base) and is_binary(secret) and is_list(opts) do
    secret = get_secret(key_base, secret, opts)

I will open a PR!

@kevinschweikert kevinschweikert changed the title chore: rename secret to salt docs: rename secret to salt Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants