Skip to content
New issue

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

Puzzled: Invalid key length #1

Open
haowanxing opened this issue May 29, 2018 · 0 comments
Open

Puzzled: Invalid key length #1

haowanxing opened this issue May 29, 2018 · 0 comments

Comments

@haowanxing
Copy link

First of all. thanks for that you provide this project. it's very helpful ! and I hope that you can understand what i have writen. cuz my english is not so well. :)

well, i have a problem when i do the decrypt&encrypt with this tool .
the function: mcrypt_enc_get_key_size which returns a integer of "Default Key Size". The question is, when i choose Rijndael-128 as CipherName. The requiredKeySize must be 32. Dose that mean 16 or 24 is not supported ?

so. i have to do something like this :

if (keyLength > requiredKeySize) {
	*err = INVALID_KEY_LENGTH;
	mcrypt_module_close(td);
	return NULL;
}

and i also knew that is not right :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant