Skip to content

Commit

Permalink
Revert casing of ED25519
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields authored and anakinj committed Feb 9, 2021
1 parent ebd3fc9 commit 9ba070e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/jwt/algos/eddsa.rb
Expand Up @@ -3,7 +3,7 @@ module Algos
module Eddsa
module_function

SUPPORTED = %w[Ed25519].freeze
SUPPORTED = %w[ED25519].freeze

def sign(to_sign)
algorithm, msg, key = to_sign.values
Expand Down
6 changes: 3 additions & 3 deletions spec/jwt_spec.rb
Expand Up @@ -37,8 +37,8 @@

if defined?(RbNaCl)
data.merge!(
'Ed25519_private' => RbNaCl::Signatures::Ed25519::SigningKey.new('abcdefghijklmnopqrstuvwxyzABCDEF'),
'Ed25519_public' => RbNaCl::Signatures::Ed25519::SigningKey.new('abcdefghijklmnopqrstuvwxyzABCDEF').verify_key,
'ED25519_private' => RbNaCl::Signatures::Ed25519::SigningKey.new('abcdefghijklmnopqrstuvwxyzABCDEF'),
'ED25519_public' => RbNaCl::Signatures::Ed25519::SigningKey.new('abcdefghijklmnopqrstuvwxyzABCDEF').verify_key,
)
end
data
Expand Down Expand Up @@ -190,7 +190,7 @@
end

if defined?(RbNaCl)
%w[Ed25519].each do |alg|
%w[ED25519].each do |alg|
context "alg: #{alg}" do
before(:each) do
data[alg] = JWT.encode payload, data["#{alg}_private"], alg
Expand Down

0 comments on commit 9ba070e

Please sign in to comment.