Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure key has 64bit length.

  • Loading branch information...
commit c8d5e1991bb2804cfc723ac0fa543cc29ca1d060 1 parent de02fd2
@tstevens authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.