params string now a method
This commit is contained in:
parent
0df76daab5
commit
6614285644
1 changed files with 7 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue