Fixing out of bounds access error in crypto_tests

When **pos** is at the last element of the **in** vector executing line 34 creates index pointing outside of **in**. To prevent access violation new check is required at line 35.