needsRehash method

  1. @override
bool needsRehash(
  1. String hash
)
override

Checks if a hash needs rehashing

hash The hash to check Returns true if rehashing is needed

Implementation

@override
bool needsRehash(String hash) {
  // Basic implementation - could be enhanced based on hash algorithm
  // For now, we'll assume rehashing is needed for very old/short hashes
  return hash.length < 60; // bcrypt hashes are typically 60 characters
}