decrypt method

Uint8List decrypt(
  1. dynamic token, {
  2. int? ttl,
})

Implementation

Uint8List decrypt(final dynamic token, {final int? ttl}) {
  if (token is! Uint8List && token is! String) {
    throw ArgumentError('token must be Uint8List or String');
  }
  for (final Fernet f in _fernets) {
    try {
      return f.decrypt(token, ttl: ttl);
    } on InvalidToken {
      continue;
    }
  }
  throw InvalidToken();
}