Top Level Namespace
Defined Under Namespace
Modules: Arver, TestConfigLoader
Classes: String
Instance Method Summary
collapse
Instance Method Details
#passfunc(hook, uid_hint, passphrase_info, prev_was_bad, fd) ⇒ Object
151
152
153
154
155
156
157
158
159
160
161
|
# File 'lib/arver/key_saver.rb', line 151
def passfunc(hook, uid_hint, passphrase_info, prev_was_bad, fd)
Arver::Log.write("Passphrase for #{uid_hint}: ")
begin
io = IO.for_fd(fd, 'w')
io.puts( ask("") { |q| q.echo = false } )
io.flush
ensure
(0 ... $_.length).each do |i| $_[i] = ?0 end if $_
end
Arver::Log.write("")
end
|
#testpassfunc(hook, uid_hint, passphrase_info, prev_was_bad, fd) ⇒ Object
163
164
165
166
167
168
169
170
171
172
173
174
|
# File 'lib/arver/key_saver.rb', line 163
def testpassfunc(hook, uid_hint, passphrase_info, prev_was_bad, fd)
$stderr.write("Passphrase for #{uid_hint}: (test Mode) ")
$stderr.flush
begin
io = IO.for_fd(fd, 'w')
io.puts( "test" )
io.flush
ensure
(0 ... $_.length).each do |i| $_[i] = ?0 end if $_
end
$stderr.puts
end
|