experimental
fix index out of range
add unit test for encryption
move polarssl context to unmanaged heap; fix #32