Modify accepted length to be compatible with android app

master
Guillaume Dott 2014-10-22 10:40:11 +02:00
parent a95d9a2ab5
commit 579ff101ca
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ class Twik
def initialize(privatekey, length: 16, type: :alphanumeric_and_special_chars) def initialize(privatekey, length: 16, type: :alphanumeric_and_special_chars)
raise UnknownType.new("type should be one of (#{TYPE.join(', ')})") unless TYPE.include?(type) raise UnknownType.new("type should be one of (#{TYPE.join(', ')})") unless TYPE.include?(type)
raise InvalidLength.new("length should be between 1 and 26") unless (1..26).include?(length) raise InvalidLength.new("length should be between 4 and 26") unless (4..26).include?(length)
self.privatekey = privatekey self.privatekey = privatekey
self.length = length self.length = length