Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
jshawl committed Feb 7, 2024
1 parent 1a3f141 commit 6768ba0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/minisign/key_pair.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def initialize(password = nil)
def private_key
@kdf_opslimit = kdf_opslimit_bytes.pack('C*')
@kdf_memlimit = kdf_memlimit_bytes.pack('C*')
data = "Ed#{@kdf_algorithm}B2#{@kdf_salt}#{@kdf_opslimit}#{@kdf_memlimit}#{@keynum_sk}"
Minisign::PrivateKey.new(
"untrusted comment: minisign secret key\n" +
Base64.strict_encode64("Ed#{@kdf_algorithm}B2#{@kdf_salt}#{@kdf_opslimit}#{@kdf_memlimit}#{@keynum_sk}"),
"untrusted comment: minisign secret key\n#{Base64.strict_encode64(data)}",
@password
)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/minisign/key_pair_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +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)
File.write('test/generated/new-keypair.key', keypair.private_key)
end
end

0 comments on commit 6768ba0

Please sign in to comment.