Move helper function to webkit

This particular helper function is being removed from NativeCrypto, so
move it here as it's the last user of it.

Change-Id: Iea13ba499487d838068d6156d4d1e6861d05eb36
Merge "Move helper function to webkit"