Javascript implementation of RNCryptor