Skip to content

Commit

Permalink
add comment to private key from keypair
Browse files Browse the repository at this point in the history
  • Loading branch information
jshawl committed Feb 7, 2024
1 parent 2bb8b99 commit 7a1dd92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/minisign/key_pair.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def private_key
@kdf_opslimit = kdf_opslimit_bytes.pack('C*')
@kdf_memlimit = kdf_memlimit_bytes.pack('C*')
Minisign::PrivateKey.new(
"untrusted comment: minisign secret key\n" +
Base64.strict_encode64("Ed#{@kdf_algorithm}B2#{@kdf_salt}#{@kdf_opslimit}#{@kdf_memlimit}#{@keynum_sk}"),
@password
)
Expand Down
1 change: 1 addition & 0 deletions spec/minisign/key_pair_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
it 'generates a keypair with a password' do
keypair = Minisign::KeyPair.new('secret password')
expect(keypair.private_key).to be_truthy
File.write("test/generated/new-keypair.key", keypair.private_key)
end
end

0 comments on commit 7a1dd92

Please sign in to comment.