Copy c encryptor to cpp and js
Add misc test