params string now a method

This commit is contained in:
ilya 2010-07-13 15:08:14 -07:00
parent 0df76daab5
commit 6614285644

View file

@ -100,7 +100,12 @@ class User < Person
def generate_key
puts "Generating key"
ctx = GPGME::Ctx.new
paramstring = "<GnupgKeyParms format=\"internal\">
ctx.genkey(paramstring, nil, nil)
end
def paramstring
"<GnupgKeyParms format=\"internal\">
Key-Type: DSA
Key-Length: 512
Subkey-Type: ELG-E
@ -110,7 +115,6 @@ Name-Comment: #{self.url}
Name-Email: #{self.email}
Expire-Date: 0
</GnupgKeyParms>"
ctx.genkey(paramstring, nil, nil)
end
end