Password constructor

Password(
  1. List<String> password,
  2. num numberOfCollectionItems, [
  3. String separator = ''
])

Constructor for a password.

password is the result of generated password numberOfCollectionItems Is the number of items from which the password was generated separator Is the separator char use to build a String. Often set to space when using words instead of characters.

Implementation

Password(List<String> password, num numberOfCollectionItems,
    [this.separator = '']) {
  _password = password.toList(growable: false);
  _numberOfCollectionItems = numberOfCollectionItems;
  //this.separator = separator;
  _entropy = _log2(
      pow(_numberOfCollectionItems.toDouble(), _password.length.toDouble()));
}