Session
Defined in: session.ts:51
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Session(
options):Session
Defined in: session.ts:67
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Session
Accessors
Section titled “Accessors”autoLockMs
Section titled “autoLockMs”Get Signature
Section titled “Get Signature”get autoLockMs():
number
Defined in: session.ts:123
Returns
Section titled “Returns”number
Methods
Section titled “Methods”getKey()
Section titled “getKey()”getKey():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: session.ts:103
The DEK for one operation (zeroize it after). locked when there is none or the
timer ran out while the worker was asleep — the record is then removed as well, so
a missed alarm cannot keep the key alive.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
isUnlocked()
Section titled “isUnlocked()”isUnlocked():
Promise<boolean>
Defined in: session.ts:94
Returns
Section titled “Returns”Promise<boolean>
lock()
Section titled “lock()”lock():
Promise<void>
Defined in: session.ts:90
Forget the DEK and cancel the alarm. Safe to call when already locked.
Returns
Section titled “Returns”Promise<void>
onLock()
Section titled “onLock()”onLock(
callback): () =>void
Defined in: session.ts:134
Parameters
Section titled “Parameters”callback
Section titled “callback”() => void
Returns
Section titled “Returns”() => void
setAutoLockMs()
Section titled “setAutoLockMs()”setAutoLockMs(
ms):Promise<void>
Defined in: session.ts:128
Change the timer (options page); re-arms from now when unlocked. 0 disables.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<void>
touch()
Section titled “touch()”touch():
Promise<void>
Defined in: session.ts:112
User activity: push the auto-lock out again. No-op when locked.
Returns
Section titled “Returns”Promise<void>
unlock()
Section titled “unlock()”unlock(
dek):Promise<void>
Defined in: session.ts:79
Store the DEK and arm the auto-lock. The caller’s copy is zeroized.
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”Promise<void>