Shared check for OpenSSL support

Signed-off-by: Michal Čihař <michal@cihar.com>
Share code for resetting IV size

Signed-off-by: Michal Čihař <michal@cihar.com>
This is binary string, can not use mb_strlen

Signed-off-by: Michal Čihař <michal@cihar.com>