use keys librairy to encrypt data and add tests