Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@seald-io/react-native-accelerator

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@seald-io/react-native-accelerator

Native module for accelerating Seald SDK operations on React Native

  • 0.2.3-1
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

react-native-seald-accelerator

Native module for Seald SDK

Installation

npm install @seald-io/react-native-accelerator

Usage

import { generateSymkey, encryptFileAsString, decryptFileAsString } from "@seald-io/react-native-accelerator";

const symKey = await generateSymkey() // Generate AES Symmetric Key

// To encrypt a file
const messageId = "00000000-0000-1000-a000-1d0000000000"
const filename = "myFilename"
const utf8FileContent = "it's my file ! it's encrypted !"
const b64EncryptedFile = await encryptFileAsString(utf8FileContent, filename, messageId, symKey)

// To decrypt a file
const clearString = await decryptFileAsString(b64EncryptedFile, symKey)
const clearFile = JSON.parse(clearString)
console.log('clearFile.filename', clearFile.filename)
console.log('clearFile.messageId', clearFile.messageId)
console.log('clearFile.fileContent', clearFile.fileContent) // as utf8 string

Dev

init

installer go, puis gomobile:

go install golang.org/x/mobile/cmd/gomobile@latest

Ajouter les executables go dans le path: Linux :/usr/local/go/bin:/home/$USER/go/bin Mac export PATH=${PATH}:/Users/$USER/go/bin

Installer le SDK et le NDK Android (Android Studio le fait très bien).

You may have to install the NDK (Obsolete) package in the Android SDK Manager (for which you will have to uncheck the "Hide obsolete tools" checkbox)

Télécharger les bibliothèques GO

./download-go-library.sh -e prod

# Pour télécharger les sources depuis different env, il faut utiliser l'option -e dev/limb/prod. Default to prod
./download-go-library.sh -e dev

Run the example project

cd example
npm run ios
npm run android

// If metro serveur is not automatically started:
npm run start
IOS: For every new go build, you need to run `pod install`

Keywords

FAQs

Package last updated on 25 Nov 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc