def obfuscate(plain)
      codepoints = plain.codepoints

      raise FormatError if codepoints.length > 8

      password = Array.new(8, 0x0E)
      codepoints.each_with_index do |c, i|
        password[i] = (c & 0x40) | (~c & 0x3F)
      end
      password.pack 'c*'
    end
def obfuscate(plain)
      codepoints = plain.codepoints

      raise FormatError if codepoints.length > 8

      password = Array.new(8, 0x0E)
      codepoints.each_with_index do |c, i|
        password[i] = (c & 0x40) | (~c & 0x3F)
      end
      password.pack 'c*'
    end
Transforms a plain text password into an 8 character string recognised by
 the ADAM-6050. The algorithm, if you can even call it that, used to
 perform the transformation was found by trial and error.

 @raise [FormatError] if the plain text password is longer than 8
   characters.

 @param  plain [String] the plain text version of the password.
 @return [String] the obfuscated, 8 character password.