confidential
Instantiates the Panda-Confidential API.
confidential[ randomBytes ]api
name | type | description |
---|---|---|
randomBytes | Optional. Provides a custom implementation for
| |
api | An instance of the Confidential API. |
Panda-Confidential reduces the risk of unexpected changes by third parties by exporting only a single function that creates a new instance of the library. Presuming all access to Confidential is done this way (and not, for example, subsequently exporting individual functions), any changes will be contained to the scope of the importing module.
Example
import {confidential} from "panda-confidential"
# Instantiate Panda-Confidential
{encrypt, decrypt, SymmetricKey} = confidential()