Socket
Book a DemoInstallSign in
Socket

@particle/react-native-crypto

Package Overview
Dependencies
Maintainers
23
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@particle/react-native-crypto

React Native compatible crypto functions

latest
npmnpm
Version
1.0.6
Version published
Maintainers
23
Created
Source

@particle/react-native-crypto

React Native compatible crypto functions

Installation

npm install @particle/react-native-crypto --save

NOTE: @particle/react-native-crypto declares react-native and @particle/device-constants as a peerDependency - this ensures your app only ever has one copy of those dependencies

API

ReactNativeAes128Cipher

A React Native class for an AES-128 cipher operating in ECB mode.

Kind: global class

reactNativeAes128Cipher.encryptBlock(block) ⇒ Promise.<Uint8Array>

Encrypt a single block of data.

Kind: instance method of ReactNativeAes128Cipher
Returns: Promise.<Uint8Array> - Ciphertext block.

ParamTypeDescription
blockUint8ArrayPlaintext block. The block must be 16 bytes long.

ReactNativeEnv

A React Native environment class.

Kind: global class

reactNativeEnv.createAes128Cipher(key) ⇒ Aes128Cipher

Create an AES-128 cipher operating in ECB mode.

Kind: instance method of ReactNativeEnv
Returns: Aes128Cipher - Cipher object.

ParamTypeDescription
keyUint8ArrayEncryption key. The key must be 16 bytes long.

reactNativeEnv.getRandomBytes(size) ⇒ Promise.<Uint8Array>

Generate cryptographically strong random data.

Kind: instance method of ReactNativeEnv
Returns: Promise.<Uint8Array> - Random data.

ParamTypeDescription
sizeNumberNumber of bytes to generate.

NOTE: Unfortunately, docs have a nasty habit of falling out of date. When in doubt, check usage in tests

FAQs

Package last updated on 10 Sep 2025

Did you know?

Socket

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.

Install

Related posts