class String
Public Instance Methods
to_pgp_hex()
click to toggle source
# File lib/pgp-word-list.rb, line 6 def to_pgp_hex self.downcase.gsub(/[^a-z\ ]/,'').split().map(&:strip).to_pgp_hex.join('') end
to_pgp_words()
click to toggle source
# File lib/pgp-word-list.rb, line 2 def to_pgp_words self.upcase.gsub(/[^A-F0-9]/,'').scan(/../).to_pgp_words.join(' ') end