Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aes #10

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Aes #10

Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules/
e2e/
RNSecureRandom/
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -9,7 +9,10 @@ module.exports = {
mocha: true
},
globals: {
__DEV__: false
__DEV__: false,
device: false,
element: false,
by: false
},
extends: [
'eslint:recommended',
5 changes: 2 additions & 3 deletions ExampleGrinder/App.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
/*eslint no-unused-vars: "warn"*/

import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { SSSA } from '../lib/sssa';
import { generateSecureRandom } from 'react-native-securerandom';
const secret = 'aaA=';
type Props = {};
/**
56 changes: 28 additions & 28 deletions ExampleGrinder/ExampleGrinder.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -34,9 +34,9 @@
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
2DCD954D1E0B4F2C00145EB5 /* ExampleGrinderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleGrinderTests.m */; };
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
4C13FFE72194E70B00BAC13D /* libRNSecureRandom.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C13FFE62194E67600BAC13D /* libRNSecureRandom.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
C6C5F627218A28D200213ECF /* libRNSecureRandom.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C6C5F626218A28BA00213ECF /* libRNSecureRandom.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
@@ -278,6 +278,13 @@
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
remoteInfo = "jschelpers-tvOS";
};
4C13FFE52194E67600BAC13D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 4C13FFE12194E67600BAC13D /* RNSecureRandom.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RNSecureRandom;
};
78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
@@ -313,13 +320,6 @@
remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
remoteInfo = "RCTAnimation-tvOS";
};
C6C5F625218A28BA00213ECF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C6C5F5FC218A28B900213ECF /* RNSecureRandom.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RNSecureRandom;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
@@ -345,11 +345,11 @@
2D02E47B1E0B4A5D006451C7 /* ExampleGrinder-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ExampleGrinder-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2D02E4901E0B4A5D006451C7 /* ExampleGrinder-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ExampleGrinder-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
4C13FFE12194E67600BAC13D /* RNSecureRandom.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNSecureRandom.xcodeproj; path = "../node_modules/react-native-securerandom/ios/RNSecureRandom.xcodeproj"; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
C6C5F5E7218A1EDE00213ECF /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
C6C5F5FC218A28B900213ECF /* RNSecureRandom.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNSecureRandom.xcodeproj; path = ../RNSecureRandom/ios/RNSecureRandom.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
@@ -365,7 +365,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C6C5F627218A28D200213ECF /* libRNSecureRandom.a in Frameworks */,
4C13FFE72194E70B00BAC13D /* libRNSecureRandom.a in Frameworks */,
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
@@ -529,6 +529,14 @@
name = Frameworks;
sourceTree = "<group>";
};
4C13FFE22194E67600BAC13D /* Products */ = {
isa = PBXGroup;
children = (
4C13FFE62194E67600BAC13D /* libRNSecureRandom.a */,
);
name = Products;
sourceTree = "<group>";
};
78C398B11ACF4ADC00677621 /* Products */ = {
isa = PBXGroup;
children = (
@@ -541,7 +549,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
C6C5F5FC218A28B900213ECF /* RNSecureRandom.xcodeproj */,
4C13FFE12194E67600BAC13D /* RNSecureRandom.xcodeproj */,
C6C5F5E7218A1EDE00213ECF /* RCTAnimation.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
@@ -610,14 +618,6 @@
name = Products;
sourceTree = "<group>";
};
C6C5F5FD218A28B900213ECF /* Products */ = {
isa = PBXGroup;
children = (
C6C5F626218A28BA00213ECF /* libRNSecureRandom.a */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
@@ -778,8 +778,8 @@
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
},
{
ProductGroup = C6C5F5FD218A28B900213ECF /* Products */;
ProjectRef = C6C5F5FC218A28B900213ECF /* RNSecureRandom.xcodeproj */;
ProductGroup = 4C13FFE22194E67600BAC13D /* Products */;
ProjectRef = 4C13FFE12194E67600BAC13D /* RNSecureRandom.xcodeproj */;
},
);
projectRoot = "";
@@ -1017,6 +1017,13 @@
remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4C13FFE62194E67600BAC13D /* libRNSecureRandom.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNSecureRandom.a;
remoteRef = 4C13FFE52194E67600BAC13D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -1052,13 +1059,6 @@
remoteRef = C6C5F5EE218A1EDE00213ECF /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
C6C5F626218A28BA00213ECF /* libRNSecureRandom.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNSecureRandom.a;
remoteRef = C6C5F625218A28BA00213ECF /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
22 changes: 0 additions & 22 deletions ExampleGrinder/package.json

This file was deleted.

28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
Shamir's Secret Sharing Algorithm For React-Native
<h1 align="center">
React Native SSSA
</h1>

<h4 align="center">
Shamir's Secret Sharing Algorithm For React-Native
</h4>

<p align="center">
<a href="#installation">Installation</a> ∙
<a href="#usage">Usage</a>
</p>

A library to generate cryptographically secure shares of a secret.

## Installation

```bash
$ yarn add react-native-sssa react-native-securerandom
$ react-native link react-native-securerandom
```

This package relies on [react-native-securerandom](https://github.com/rh389/react-native-securerandom)
to provide entropy. It has native dependencies that need linking. If need be,
their documentation provides instructions for [manual linking](https://github.com/rh389/react-native-securerandom#manual-linking)

## Usage
21 changes: 0 additions & 21 deletions RNSecureRandom/__tests__/happy.js

This file was deleted.

14 changes: 0 additions & 14 deletions RNSecureRandom/__tests__/notLinked.js

This file was deleted.

34 changes: 0 additions & 34 deletions RNSecureRandom/android/build.gradle

This file was deleted.

4 changes: 0 additions & 4 deletions RNSecureRandom/android/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions RNSecureRandom/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions RNSecureRandom/index.js.flow

This file was deleted.

9 changes: 0 additions & 9 deletions RNSecureRandom/ios/RNSecureRandom.h

This file was deleted.

31 changes: 0 additions & 31 deletions RNSecureRandom/ios/RNSecureRandom.m

This file was deleted.

18 changes: 0 additions & 18 deletions RNSecureRandom/ios/RNSecureRandom.podspec

This file was deleted.

291 changes: 0 additions & 291 deletions RNSecureRandom/ios/RNSecureRandom.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

10,045 changes: 0 additions & 10,045 deletions package-lock.json

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,8 @@
},
"author": "Hadas Zeilberger",
"peerDependencies": {
"react-native": "*"
"react-native": "*",
"react-native-securerandom": "^0.3.0"
},
"repository": {
"type": "git",
@@ -31,8 +32,7 @@
],
"homepage": "https://github.com/rh389/react-native-securerandom#readme",
"dependencies": {
"base64-js": "*",
"is-base64": "^0.1.0"
"base64-js": "^1.3.0"
},
"devDependencies": {
"@babel/core": "^7.1.2",
961 changes: 7 additions & 954 deletions yarn.lock

Large diffs are not rendered by default.