From 579ff101ca88d19e8c040aefcce23b8b2ba779aa Mon Sep 17 00:00:00 2001 From: Guillaume Dott Date: Wed, 22 Oct 2014 10:40:11 +0200 Subject: [PATCH] Modify accepted length to be compatible with android app --- lib/twik.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/twik.rb b/lib/twik.rb index b4bfcb9..d404e4b 100644 --- a/lib/twik.rb +++ b/lib/twik.rb @@ -10,7 +10,7 @@ class Twik 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 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.length = length