We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if you try decrypting with a 16 byte key it converts the keylength to 24 bytes
the following function should be changed to add <= for 16 and 24 byte comparisons
static void FixKeyLengths( CCAlgorithm algorithm, NSMutableData * keyData, NSMutableData * ivData ) { NSUInteger keyLength = [keyData length]; switch ( algorithm ) { case kCCAlgorithmAES128: { if ( keyLength <= 16 ) { [keyData setLength: 16]; } else if ( keyLength <= 24 ) { [keyData setLength: 24]; } else { [keyData setLength: 32]; }
break;
The text was updated successfully, but these errors were encountered:
Guess this also goes for the kCCAlgorithmCAST
kCCAlgorithmCAST
case kCCAlgorithmCAST: { if ( keyLength <= 5 ) { [keyData setLength: 5]; } else if ( keyLength > 16 ) { [keyData setLength: 16]; } break; }
Sorry, something went wrong.
No branches or pull requests
if you try decrypting with a 16 byte key it converts the keylength to 24 bytes
the following function should be changed to add <= for 16 and 24 byte comparisons
static void FixKeyLengths( CCAlgorithm algorithm, NSMutableData * keyData, NSMutableData * ivData )
{
NSUInteger keyLength = [keyData length];
switch ( algorithm )
{
case kCCAlgorithmAES128:
{
if ( keyLength <= 16 )
{
[keyData setLength: 16];
}
else if ( keyLength <= 24 )
{
[keyData setLength: 24];
}
else
{
[keyData setLength: 32];
}
The text was updated successfully, but these errors were encountered: