index/functions/withPrivateKey.md
withPrivateKey<
T>(privateKey,action):T
Runs action with a private normalized copy of the key, zeroed afterwards (also when action
throws). Bytes given by the caller are copied, never modified: the caller owns them.
private key
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
privateKey | PrivateKeyInput |
action | (key) => T |
private key input
Returns
T