cleanCrypts method

  1. @protected
void cleanCrypts()

Protected method to clear all crypts and expired crypts

Implementation

@protected
void cleanCrypts() {
  // Move expired crypts to protectedExpiredCrypts
  final expired = protectedCrypts.where((c) => c.isExpired()).toList();
  protectedExpiredCrypts.addAll(expired);
  protectedCrypts.removeWhere((c) => c.isExpired());
  // Remove expired crypts that are too old
  removeOldExpiredCrypts();
  // Limit the number of expired crypts
  limitExpiredCrypts();
}