Observed since 20 Oct, 22:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@0to10/profiles
Typescript library for working with encrypted profiles
This repository provides structures to work with encrypted profiles.
Get started quickly by following the instructions below.
Use NPM to install this library into your project:
npm install --save @0to10/profiles
All configuration must be done before using any other structures provided by this package, or risk ending with an unstable state and/or corrupted data.
Configure the available cryptography parameters. Example below:
import {CryptoVersions} from '@0to10/profiles';
CryptoVersions.configure([
{
number: 1,
algorithm: {
name: 'AES-CTR',
iv_length: 64,
},
},
]);
Below is an example of how to create a new profile, using the ProfileFactory class
and adding some data to it.
The Profile instance created by the ProfileFactory is a roaming profile, meaning
that it is unencrypted and mutable. A roaming profile may only be used locally on an
authorised device, and must never leave that device in its unencrypted form.
'use strict';
import {ProfileFactory, RoamingProfile} from '@0to10/profiles';
const factory: ProfileFactory = new ProfileFactory();
const profile: RoamingProfile = factory.create();
profile.data.set('sensitive_information', 'I am using a Qwerty keyboard.');
Any required authentication information should be stored outside the profile, as this information is not accessible until the profile is decrypted.
Before transporting the profile, it must be encrypted. Classes that transport or store a profile instance must refuse storing any unsealed profiles.
'use strict';
import {EncryptedProfile, Profile, ProfileFactory} from '@0to10/profiles';
const factory: ProfileFactory = new ProfileFactory();
const profile = factory.create();
// Modify the profile
const encryptedProfile: EncryptedProfile = profile.encrypt(
await profile.deriveMasterKey('MyS3cretPassw0rd!')
);
// Store the profile
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
pkijsEnvironment{
"local_name": "pkijs",
"alias": false,
"peer_metadata": null
} | ^3.0.15 | runtime |
unormEnvironment{
"local_name": "unorm",
"alias": false,
"peer_metadata": null
} | ^1.6.0 | runtime |
scrypt-jsEnvironment{
"local_name": "scrypt-js",
"alias": false,
"peer_metadata": null
} | ^3.0.1 | runtime |
@peculiar/webcryptoEnvironment{
"local_name": "@peculiar/webcrypto",
"alias": false,
"peer_metadata": null
} | ^1.4.3 | runtime |
jestEnvironment{
"local_name": "jest",
"alias": false,
"peer_metadata": null
} | ^29.5.0 | development |
tslibEnvironment{
"local_name": "tslib",
"alias": false,
"peer_metadata": null
} | ^2.2.0 | development |
bufferEnvironment{
"local_name": "buffer",
"alias": false,
"peer_metadata": null
} | ~6.0.3 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ^8.56.0 | development |
ts-jestEnvironment{
"local_name": "ts-jest",
"alias": false,
"peer_metadata": null
} | ^29.1.0 | development |
webpackEnvironment{
"local_name": "webpack",
"alias": false,
"peer_metadata": null
} | 5.94.0 | development |
ts-loaderEnvironment{
"local_name": "ts-loader",
"alias": false,
"peer_metadata": null
} | ^9.5.1 | development |
webpack-cliEnvironment{
"local_name": "webpack-cli",
"alias": false,
"peer_metadata": null
} | ^5.1.4 | development |
@types/unormEnvironment{
"local_name": "@types/unorm",
"alias": false,
"peer_metadata": null
} | ^1.3.29 | development |
@jest/globalsEnvironment{
"local_name": "@jest/globals",
"alias": false,
"peer_metadata": null
} | ^29.5.0 | development |
@typescript-eslint/parserEnvironment{
"local_name": "@typescript-eslint/parser",
"alias": false,
"peer_metadata": null
} | ^6.19.0 | development |
eslint-plugin-deprecationEnvironment{
"local_name": "eslint-plugin-deprecation",
"alias": false,
"peer_metadata": null
} | ^2.0.0 | development |
@typescript-eslint/eslint-pluginEnvironment{
"local_name": "@typescript-eslint/eslint-plugin",
"alias": false,
"peer_metadata": null
} | ^6.19.0 | development |
Source distribution
{
"shasum": "e62fcda7d56cecf722dfeae0224c6fbacc5ae0b5",
"tarball": "https://registry.npmjs.org/@0to10/profiles/-/profiles-1.3.2.tgz",
"fileCount": 183,
"integrity": "sha512-zHmQpFlZndbdCoh6lJeMUN9SXW0hO6q75k0G3aGtErFe7cVuk7yT+wCI85cqNd1Q70FmHAHFK2jD2CZm9XuSsA==",
"signatures": [
{
"sig": "MEQCICqKmBj9pJS0gVlYwccZQLcXbXx93fUJNKAKqoIWBjH0AiApwaeVx3mS3ak9QK+emQTC++cE90u7LfPGTmTRzSmhnQ==",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 136440
}Shared repository data · GitHub
Observed since 20 Oct, 22:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:4a5a876dc171e4663a82c60081aa0af2e20936e6dff58e1dc8cd31a547b9ca3a