Add data padding and key derivation.
Fix StringHelper::substr() call.
Merge pull request #919 from ekerazha/master

Add data padding and key derivation.