1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2025-03-19 12:59:30 +00:00

write pub key in tarball

This commit is contained in:
nishiki 2016-05-06 10:53:32 +02:00
parent 797efa2b93
commit c1cab93dce

View file

@ -99,8 +99,6 @@ class MPW
) )
end end
Gem::Package::TarWriter.new(File.open(@wallet_file, 'w+')) do |tar| Gem::Package::TarWriter.new(File.open(@wallet_file, 'w+')) do |tar|
data_encrypt = encrypt(YAML::dump(data)) data_encrypt = encrypt(YAML::dump(data))
tar.add_file_simple('wallet/meta.gpg', 0400, data_encrypt.length) do |io| tar.add_file_simple('wallet/meta.gpg', 0400, data_encrypt.length) do |io|
@ -112,8 +110,13 @@ class MPW
io.write(password) io.write(password)
end end
end end
end
@keys.each do |id, key|
tar.add_file_simple("wallet/keys/#{id}.pub", 0400, key.length) do |io|
io.write(password)
end
end
end
end end
# TODO comment # TODO comment