fix incorrect padding with multi-byte strings

As far as encrypting and paddings are concerned, we are talking about **bytes** and not **characters**. So basic strlen/substr functions must be used instead of their mbstring version.
Merge pull request #1962 from fpirsch/master

fix incorrect padding with multibyte strings encryption