getXXTeaSembastCodec function

SembastCodec getXXTeaSembastCodec({
  1. required String password,
})

Create a codec to use when opening an encrypted sembast database

The usage is then

// Initialize the encryption codec with a user password
var codec = getXXTeaSembastCodec(password: '[your_user_password]');
// Open the database with the codec
Database db = await factory.openDatabase(dbPath, codec: codec);

// ...your database is ready to use as encrypted

Implementation

SembastCodec getXXTeaSembastCodec({required String password}) =>
    SembastCodec(signature: 'xxtea', codec: _XXTeaCodec(password));