nostr:npub1u27r9h3j9pvrplaffsmpn698e8xhmuqhdgcxldv67ammql9pumnqha3qfq I think the short answer is "hashing". See, e.g.:
https://www.missingkids.org/ourwork/ncmecdata
https://www.thorn.org/reporting-child-sexual-abuse-content-shared-hash/
https://www.thorn.org/blog/hashing-detect-child-sex-abuse-imagery/