Add a self-test for salt() ensuring it returns same data for
same salt. See #953.