Implement XForms' "digest" function

Hi @torrado,

Not yet, but close! It was actually available briefly but we discovered a bug in the latest Enketo Express, so had to revert.

3 Likes

Hi @martijnr any news about it?

it looks like it is not available alredy:

Hi @martijnr Any news about digest()?

Hi @atorrado,

It’s been available since Enketo 2.6.0: enketo-express/CHANGELOG.md at master · enketo/enketo-express · GitHub. I’m not the right person to respond about the version of Enketo that is deployed by KoBoToolbox.

Cheers,

2 Likes

I’ve been testing digest() for hashing personal IDs and it seems to be working as expected in KoboCollect, but for Enketo it’s treating my Xpath variable as a static string and not reading the dynamic values.

This is my calculation:

digest(${id},'SHA-256','hex')

When using Enketo, the output is always the same no matter what the value is for id, but in KoboCollect, the output changes for each unique id that is entered.

We’ll be using KoboCollect for our project, so shouldn’t be an issue, just FYI @martijnr @wroos

1 Like