fix incorrect padding with multibyte strings encryption

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.