Skip to main content

store_id_from_salt

Function store_id_from_salt 

Source
pub fn store_id_from_salt(salt: &[u8]) -> String
Expand description

Derives a stable store identifier from a store’s salt.

The identifier is the hex-encoded SHA-256 of the salt bytes. Because every repo or store has its own salt, the resulting id is distinct per store, which is what lets each store occupy its own key slot (file name or keychain account) without clobbering another store’s key.