title: Is there a way to generate the same hash across multiple executions in Swift?
body: <p>Apple's <a href="https://developer.apple.com/documentation/swift/hasher" rel="nofollow noreferrer">Hasher documentation</a> tells that Hasher generates a different hash value on every execution and that hashes shouldn't persist across multiple executions.</p>
  <blockquote>
  <p>Do not save or otherwise reuse hash values across executions of your program. Hasher is usually randomly seeded, which means it will return different values on every new execution of your program. The hash algorithm implemented by Hasher may itself change between any two versions of the standard library.</p>
  </blockquote>
  <p>I do need, however, a way to generate a hash that is reproducible across multiple sessions. I am trying to use the hash value to differentiate between labels of a hashable structure. Since the input data may come from different executions, hashes wouldn't match if I used <code>Hasher</code> and <code>Hashable</code>.</p>
  <p>I've considered writing an implementation of a murmur hashing algorithm, but those generally apply to string values, not optional structures.</p>
  <p>Is there an alternative to Hasher in Swift that I could use to get reproducible hashes with arbitrary structures? Is there a hashing function that accepts a starting seed?</p>
  <p>Thank you for your help!</p>