looksLikeSignature static method

bool looksLikeSignature(
  1. String? signature
)

A minimal signature format sanity check. This does NOT perform real cryptographic verification — see CryptoUtils.verifySignature for that. This just guards against obviously malformed values (empty, too short, whitespace-only).

Implementation

static bool looksLikeSignature(String? signature) {
  if (signature == null) return false;
  final trimmed = signature.trim();
  if (trimmed.isEmpty) return false;
  if (trimmed.length < 8) return false;
  return true;
}