BLEMeshJS
API

Crypto Package

Mesh cryptographic helpers layered on top of the shared utility and protocol packages.

This page is auto-generated from packages/crypto/src/** and the public exports exposed by @blemeshjs/crypto.

Update TSDoc comments in source, then run yarn workspace docs api:generate. Normal docs dev, build, and types:check runs regenerate these pages automatically.

Package overview

FieldValue
Package@blemeshjs/crypto
Entry pointpackages/crypto/src/index.ts
Source treepackages/crypto/src/**

Export map

ExportKindSummary
CryptoClassA helper class for handling cryptography. Method implementation is based on Security toolbox and other parts from the Bluetooth Mesh Protocol 1.1. It is backwards compatible with older versions of the specification.

Exported API

Crypto

Kind: Class

Source: packages/crypto/src/crypto.ts#L35

A helper class for handling cryptography. Method implementation is based on Security toolbox and other parts from the Bluetooth Mesh Protocol 1.1. It is backwards compatible with older versions of the specification.

class Crypto

Constructors

NameSignatureDescription
constructorCrypto(): Crypto;No description yet.

Methods

NameSignatureDescription
authenticateauthenticate(pdu: Uint8Array, key: Uint8Array): boolean;No description yet.
calculateAidcalculateAid(key: Uint8Array): UInt8;No description yet.
calculateConfirmationcalculateConfirmation(confirmationInputs: Uint8Array, sharedSecret: Uint8Array, random: Uint8Array, authValue: Uint8Array, algorithm: Algorithm): Uint8Array;No description yet.
calculateHashcalculateHash(data: Uint8Array, key: Uint8Array): Uint8Array;No description yet.
calculateKeyDerivativescalculateKeyDerivatives(key: Uint8Array): { beaconKey: Uint8Array; encryptionKey: Uint8Array; identityKey: Uint8Array; nid: UInt8; privacyKey: Uint8Array; privateBeaconKey: Uint8Array };No description yet.
calculateKeyscalculateKeys(confirmationInputs: Uint8Array, sharedSecret: Uint8Array, provisionerRandom: Uint8Array, deviceRandom: Uint8Array, algorithm: Algorithm): { deviceKey: Uint8Array; sessionKey: Uint8Array; sessionNonce: Uint8Array };No description yet.
calculateNetworkIdcalculateNetworkId(key: Uint8Array): Uint8Array;No description yet.
calculateSharedSecretcalculateSharedSecret(privateKey: Uint8Array, publicKey: Uint8Array): string;No description yet.
calculateVirtualAddresscalculateVirtualAddress(virtualLabel: UUID): Address;No description yet.
decodeAndAuthenticatedecodeAndAuthenticate(pdu: Uint8Array, key: Uint8Array): { ivIndex: IvIndex; keyRefreshFlag: boolean } | undefined;No description yet.
decryptdecrypt(data: Uint8Array, key: Uint8Array, nonce: Uint8Array, mic: Uint8Array, aad?: Uint8Array<ArrayBufferLike>): Uint8Array<ArrayBufferLike> | undefined;No description yet.
encryptencrypt(data: Uint8Array, key: Uint8Array, nonce: Uint8Array, micSize: number, aad?: Uint8Array<ArrayBufferLike>): Uint8Array;No description yet.
generateKeygenerateKey(): Uint8Array<ArrayBufferLike>;No description yet.
generateKeyPairgenerateKeyPair(_algorithm: Algorithm): { privateKey: string; publicKey: string };No description yet.
generateRandomgenerateRandom(sizeInBits: number): Uint8Array;No description yet.
obfuscateobfuscate(data: Uint8Array, random: Uint8Array, ivIndex: UInt32, privacyKey: Uint8Array): Uint8Array;No description yet.

On this page