randomSalt
randomSalt():
bigint
Defined in: src/entity/key.ts:17
A cryptographically random 128-bit salt — what CreateEntityParameters.salt defaults to.
The salt exists for unpredictability, not uniqueness: the per-owner nonce already guarantees distinct keys. Random bits mean only the creator can predict the key of an entity they are about to create, so nobody else can reference or squat it in advance.
Returns
Section titled “Returns”bigint
Throws
Section titled “Throws”If the runtime has no crypto.getRandomValues.