Function encryptForThisServer
- encryptForThisServer<S extends string>(
scope: S | (keyof ServerEncryptionScopes),
data: S extends keyof ServerEncryptionScopes
? ServerEncryptionScopes[S<S>]
: unknown,
): stringType Parameters
- S extends string
Parameters
- scope: S | (keyof ServerEncryptionScopes)
Scope for encryption (must be unique for each Encrypt usage so you can't accidentally mix up calls)
- data: S extends keyof ServerEncryptionScopes ? ServerEncryptionScopes[S<S>] : unknown
Data to sign and encrypt. Will be encoded as typed JSON if necessary
Returns string
Encrypted data, base64url encoded (so safe for direct use in URLs)
Encrypt data with this server's local key