Md5 or sha256 hash of the contact's email in custom header

Your software
My Mautic version is: 3.3.3
My PHP version is: 7.3.27
My Database type and version is: mariadb:10.2

Your problem
My problem is:

Hello,
I want to get the md5 or sha256 hash of the contact’s email to add it in a custom header.
'list-unsubscribe' => '<mailto: brand.{contactfield=emailmd5}@unsub.brand.com?subject=unsubscribe>'

What do you think is the best way to go?
Should we create an extra field and pre-generate the md5 hashes (if necessary is it possible to do this without a custom module?)
Or
Is there a way to convert the variable {contactfield=email} in hash?

Thank you !