Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@evervault/sdk
Advanced tools
The evervault SDK allows developers to integrate with evervault auth and encrypt/decrypt data within their web app. Built on the Web Crypto API.
evervault.checkAuth(appId): void
Check a user's auth status in the system, and redirect them if they are unauthenticated.
Param | Type | Description |
---|---|---|
appId | String | The unique identifier for your app in the evervault system |
evervault.encrypt(data[, encryptOptions]): Promise<String>
Encrypt data using a user's secret key. The encrypt function will handle any data excluding undefined
and Symbol
.
Param | Type | Description |
---|---|---|
data | any | the data to be encrypted |
encryptOptions | object | control how your data is encrypted |
Key | Value | Description |
---|---|---|
preserveObjectShape | boolean | if true, javascript objects will only have their values encrypted, if false objects will be stringified |
fieldsToEncrypt | Array<String> | a list of fields in an object to encrypt |
privateKey | String | a base64 representation of a user's evervault secret key |
evervault.decrypt(data[, privateKey]): Promise<String>
Decrypt evervault encrypted data. Decrypt will preserve the shape of any object it's given (e.g. Array or Object). Any stringified data that enters decrypt will be parsable when it has been decrypted.
Param | Type | Description |
---|---|---|
data | any | the data to be decrypted, be it an object, array or a string |
privateKey | String | a base64 representation of a user's evervault secret key |
evervault.set(toSet): Promise<Object>
Save data on behalf of the user in evervault storage.
Param | Type | Description |
---|---|---|
toSave | Object | the data to be saved. Must be an object in { "key": "value" } form |
evervault.set([toGet]): Promise<Object>
Retrieve data on behalf of the user in evervault storage.
Param | Type | Description |
---|---|---|
toGet | String | Optional. the data to be retrieved. Must resolve to a previously stored piece of data |
logout(): void
Remove a user's credentials and redirect them to evervault auth.
refreshAccessToken([accessToken, refreshToken]): Promise<Object>
Refresh a user's access token in the evervault system.
Param | Type | Description |
---|---|---|
accessToken | String | a user's evervault access token to authenticate them in your system |
refreshToken | String | a user's evervault refresh token to keep them authenticated |
FAQs
Node.js SDK for Evervault
We found that @evervault/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.