Ruby implementation of RNCryptor format