Skip to content

Conversation

shanmukhateja
Copy link

Fixes #29

@sw6ueyz
Copy link

sw6ueyz commented Sep 30, 2025

Please check your code again.
It will completely disable segment size validation since (n * S) % S === 0, the error will never occur.
It seems like the fix should be something like this:

if ((plaintext.length * 8) % this.segmentSize !== 0)

@shanmukhateja
Copy link
Author

Hi @sw6ueyz

I do not remember why this change was needed and frankly I do not need it anymore.

Feel free to make changes as you see fit. I won't be able to help with this. It's been 5 years :)

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

Successfully merging this pull request may close these issues.

CFB encryption/decryption segment size error may be incorrect

2 participants