I am making a functionality in which when a user will hit a perticular node it will check the request.auth.token.crc is equal to the value stored in the resource.data.crc as i need to encrypt the resource.data.crc because the value in request.auth.token.crc also encrypted i want to check if both values are same
match /testcrc/{testId} { allow read: if request.auth.token.crc == hashing.sha256(resource.data.crc.utf8()); }
here the hased value for request.auth.token.crc
is 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 and resource.data.crc
is test
Harmandeep Singh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1