@kameleoon/react-native-secure-prng
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Kameleoon React Native EventSource

Introduction

Kameleoon React Native Secure Pseudorandom Number Generator (PRNG) is a small helper package which provides default implementation for Kameleoon React Native SDK external PRNG built on top of react-native-get-random-values library.

It can be used to provide a secure PRNG implementation for Kameleoon React Native SDK due to some versions of Hermes engine not supporting crypto module and providing weak Math.random implementation that can lead to substantial biases in generated identifiers, which is especially important for external data integration tools like BigQuery.

For more information refer to Official Kameleoon Documentation

Contents

Installation

  • npm - npm install @kameleoon/react-native-secure-prng
  • yarn - yarn add @kameleoon/react-native-secure-prng
  • pnpm - pnpm add @kameleoon/react-native-secure-prng
  • bun - bun install @kameleoon/react-native-secure-prng

For iOS additionally run npx pod-install to install dependencies

Configuration

While using @kameleoon/javascript-sdk:

  • Import KameleoonEventSource
  • Instantiate and pass it to external SDK dependencies
import { KameleoonClient } from '@kameleoon/javascript-sdk';
import { KameleoonSecurePRNG } from '@kameleoon/react-native-secure-prng';

const client = new KameleoonClient({
  siteCode: 'my_site_code',
  externals: {
    securePRNG: new KameleoonSecurePRNG(),
  },
});

Package Sidebar

Install

npm i @kameleoon/react-native-secure-prng

Weekly Downloads

25

Version

1.0.1

License

ISC

Unpacked Size

5.27 kB

Total Files

9

Last publish

Collaborators

  • kameleoon-sdk
  • vinyutochkin
  • mmunhurrun