Skip to content

Instantly share code, notes, and snippets.

View ninjaroot-509's full-sized avatar
🏠
Working from home

Castin Stanley ninjaroot-509

🏠
Working from home
View GitHub Profile
@autotrof
autotrof / App.tsx
Last active February 3, 2024 20:33
encrypt decrypt file in react native [working with large file]. using react-native-fs and node-forge
import React from 'react';
import { StyleSheet, Text, View, PermissionsAndroid, ProgressBarAndroid } from 'react-native';
import RNFS from 'react-native-fs'
import forge from 'node-forge'
import {Buffer} from 'buffer'
import zlib from 'react-zlib-js'
const key = forge.random.getBytesSync(16);
const iv = forge.random.getBytesSync(16);
const limit_big = 1024*512;