Catalog npm
Back to packageRELEASE DETAILS

1.3.2

npm

@0to10/profiles

Typescript library for working with encrypted profiles

cryptographyencryptionprofilesecuresecurityuser
Published3 May 2025
Direct dependencies17
Transitive dependenciesNot calculated

README

Current package documentation

Secure Profile

This repository provides structures to work with encrypted profiles.

Getting started

Get started quickly by following the instructions below.

Installation

Use NPM to install this library into your project:

npm install --save @0to10/profiles

Configuration

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,
        },
    },
]);

Create a profile

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.

Encrypt a profile

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 17

Native requirements
17 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
pkijs
Environment
{
  "local_name": "pkijs",
  "alias": false,
  "peer_metadata": null
}
^3.0.15runtime
unorm
Environment
{
  "local_name": "unorm",
  "alias": false,
  "peer_metadata": null
}
^1.6.0runtime
scrypt-js
Environment
{
  "local_name": "scrypt-js",
  "alias": false,
  "peer_metadata": null
}
^3.0.1runtime
@peculiar/webcrypto
Environment
{
  "local_name": "@peculiar/webcrypto",
  "alias": false,
  "peer_metadata": null
}
^1.4.3runtime
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^29.5.0development
tslib
Environment
{
  "local_name": "tslib",
  "alias": false,
  "peer_metadata": null
}
^2.2.0development
buffer
Environment
{
  "local_name": "buffer",
  "alias": false,
  "peer_metadata": null
}
~6.0.3development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^8.56.0development
ts-jest
Environment
{
  "local_name": "ts-jest",
  "alias": false,
  "peer_metadata": null
}
^29.1.0development
webpack
Environment
{
  "local_name": "webpack",
  "alias": false,
  "peer_metadata": null
}
5.94.0development
ts-loader
Environment
{
  "local_name": "ts-loader",
  "alias": false,
  "peer_metadata": null
}
^9.5.1development
webpack-cli
Environment
{
  "local_name": "webpack-cli",
  "alias": false,
  "peer_metadata": null
}
^5.1.4development
@types/unorm
Environment
{
  "local_name": "@types/unorm",
  "alias": false,
  "peer_metadata": null
}
^1.3.29development
@jest/globals
Environment
{
  "local_name": "@jest/globals",
  "alias": false,
  "peer_metadata": null
}
^29.5.0development
@typescript-eslint/parser
Environment
{
  "local_name": "@typescript-eslint/parser",
  "alias": false,
  "peer_metadata": null
}
^6.19.0development
eslint-plugin-deprecation
Environment
{
  "local_name": "eslint-plugin-deprecation",
  "alias": false,
  "peer_metadata": null
}
^2.0.0development
@typescript-eslint/eslint-plugin
Environment
{
  "local_name": "@typescript-eslint/eslint-plugin",
  "alias": false,
  "peer_metadata": null
}
^6.19.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "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
}

Repository

PENDING
0to10/secure-profile-library-ts

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:16 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:4a5a876dc171e4663a82c60081aa0af2e20936e6dff58e1dc8cd31a547b9ca3a

Other collected versions

1.4.214 May1.4.13 May1.4.03 May1.3.43 May1.3.33 May1.3.12 MayView all collected versions →