Permalink
Browse files

Ensure key has 64bit length.

  • Loading branch information...
1 parent de02fd2 commit c8d5e1991bb2804cfc723ac0fa543cc29ca1d060 @tstevens committed May 7, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 DES.rb
View
1 DES.rb
@@ -27,6 +27,7 @@ class DESCBC
0x21, 0x01, 0x29, 0x09, 0x31, 0x11, 0x39, 0x19]
def initialize(data, key)
+ raise "DES::InvalidKeyLength: Key String must be 8 characters." unless input.length.eql?(8)
@data = data
@key = key
end

0 comments on commit c8d5e19

Please sign in to comment.