prevent mangling the input string
git-svn-id: file:///home/svn/framework3/trunk@11148 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
4c26dfbfd8
commit
ee7d5827d5
|
@ -32,7 +32,8 @@ module RFB
|
|||
class Cipher
|
||||
|
||||
def self.mangle_password(password)
|
||||
key = password || ''
|
||||
key = ''
|
||||
key = password.dup if password
|
||||
key.slice!(8,key.length) if key.length > 8
|
||||
key << "\x00" * (8 - key.length) if key.length < 8
|
||||
|
||||
|
|
Loading…
Reference in New Issue