Skip to content

Commit

Permalink
Merge pull request AlanQuatermain#19 from rckoenes/master
Browse files Browse the repository at this point in the history
encryption key length fixed
  • Loading branch information
AlanQuatermain committed Mar 13, 2013
2 parents 97af5fd + abe45b0 commit 880081d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CommonCrypto/NSData+CommonCrypto.m
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ static void FixKeyLengths( CCAlgorithm algorithm, NSMutableData * keyData, NSMut
{
case kCCAlgorithmAES128:
{
if ( keyLength < 16 )
if ( keyLength <= 16 )
{
[keyData setLength: 16];
}
else if ( keyLength < 24 )
else if ( keyLength <= 24 )
{
[keyData setLength: 24];
}
Expand All @@ -310,7 +310,7 @@ static void FixKeyLengths( CCAlgorithm algorithm, NSMutableData * keyData, NSMut

case kCCAlgorithmCAST:
{
if ( keyLength < 5 )
if ( keyLength <= 5 )
{
[keyData setLength: 5];
}
Expand Down

0 comments on commit 880081d

Please sign in to comment.