Socket
Socket
Sign inDemoInstall

react-native-rsa-native

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-rsa-native - npm Package Compare versions

Comparing version 1.1.4 to 2.0.0

android/.settings/org.eclipse.buildship.core.prefs

48

index.d.ts

@@ -6,32 +6,68 @@ declare module 'react-native-rsa-native' {

interface CSRKey {
csr: string;
}
interface KeyPair extends PublicKey {
private: string;
}
type TypeCrypto =
'SHA256withRSA'|
'SHA512withRSA'|
'SHA1withRSA'|
'SHA256withECDSA'|
'SHA512withECDSA'|
'SHA1withECDSA'
namespace RSA {
export function generate(keySize: number): Promise<PublicKey>;
export function generate(): Promise<PublicKey>;
export function generateKeys(keySize: number): Promise<KeyPair>;
export function encrypt(data: string, key: string): Promise<string>;
export function decrypt(data: string, key: string): Promise<string>;
export function encrypt64(data: string, key: string): Promise<string>;
export function decrypt64(data: string, key: string): Promise<string>;
export function sign(data: string, key: string): Promise<string>;
export function signWithAlgorithm(data: string, key: string, signature?: 'SHA256withRSA' | 'SHA512withRSA'): Promise<string>;
export function signWithAlgorithm(data: string, key: string, signature?: TypeCrypto): Promise<string>;
export function sign64(data: string, key: string): Promise<string>;
export function sign64WithAlgorithm(data: string, key: string, signature?: TypeCrypto): Promise<string>;
export function verify(data: string, secretToVerify: string, key: string): Promise<boolean>;
export function verifyWithAlgorithm(data: string, secretToVerify: string, key: string, signature?: 'SHA256withRSA' | 'SHA512withRSA'): Promise<boolean>;
export function verifyWithAlgorithm(data: string, secretToVerify: string, key: string, signature?: TypeCrypto): Promise<boolean>;
export function verify64(data: string, secretToVerify: string, key: string): Promise<boolean>;
export function verify64WithAlgorithm(data: string, secretToVerify: string, key: string, signature?: TypeCrypto): Promise<boolean>;
export const SHA256withRSA: string;
export const SHA512withRSA: string;
export const SHA1withRSA: string;
export const SHA256withECDSA: string;
export const SHA512withECDSA: string;
export const SHA1withECDSA: string;
}
namespace RSAKeychain {
export function generate(keyTag: string, keySize: number): Promise<PublicKey>;
export function generate(keyTag: string): Promise<PublicKey>;
export function generateEC(keyTag: string): Promise<PublicKey>;
export function generateCSR(keyTag: string, CN: string, signature?: TypeCrypto): Promise<CSRKey>;
export function generateKeys(keyTag: string, keySize: number): Promise<PublicKey>;
export function generateCSRWithEC(cn: String,keyTag: string, keySize: number): Promise<PublicKey & CSRKey>;
export function deletePrivateKey(keyTag: string): Promise<boolean>;
export function encrypt(data: string, keyTag: string): Promise<string>;
export function decrypt(data: string, keyTag: string): Promise<string>;
export function encrypt64(data: string, keyTag: string): Promise<string>;
export function decrypt64(data: string, keyTag: string): Promise<string>;
export function sign(data: string, keyTag: string): Promise<string>;
export function signWithAlgorithm(data: string, keyTag: string, signature?: 'SHA256withRSA' | 'SHA512withRSA'): Promise<string>;
export function signWithAlgorithm(data: string, keyTag: string, signature?: TypeCrypto): Promise<string>;
export function sign64WithAlgorithm(data: string, keyTag: string, signature?: TypeCrypto): Promise<string>;
export function verify(data: string, secretToVerify: string, keyTag: string): Promise<boolean>;
export function verifyWithAlgorithm(data: string, secretToVerify: string, keyTag: string, signature?: 'SHA256withRSA' | 'SHA512withRSA'): Promise<boolean>;
export function verifyWithAlgorithm(data: string, secretToVerify: string, keyTag: string, signature?: TypeCrypto): Promise<boolean>;
export function verify64WithAlgorithm(data: string, secretToVerify: string, keyTag: string, signature?: TypeCrypto): Promise<boolean>;
export function getPublicKey(keyTag: string): Promise<string | undefined>;
export function getPublicKeyDER(keyTag: string): Promise<string | undefined>;
export function getPublicKeyRSA(keyTag: string): Promise<string | undefined>;
export function deletePrivateKey(keyTag: string): Promise<boolean>;
export const SHA256withRSA: string;
export const SHA512withRSA: string;
export const SHA1withRSA: string;
export const SHA256withECDSA: string;
export const SHA512withECDSA: string;
export const SHA1withECDSA: string;
}

@@ -38,0 +74,0 @@

2

package.json
{
"name": "react-native-rsa-native",
"version": "1.1.4",
"version": "2.0.0",
"description": "A native implementation of RSA key generation and encryption/decryption.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -30,10 +30,5 @@ # react-native-rsa-native

### Mostly automatic installation:
## Older React-Native versions
If you are using an older version of React Native and are having issues try using v1.1.14
`$ react-native link react-native-rsa-native`
## iOS
In your React Native Xcode project, right click on your project and go 'Add Files to ...', then navigate to <your-project-root>/node_modules/react-native-rsa-native/ios and select the RNRSA.xcodeproj file. Then in the build settings for your target under 'Link Binary With Libraries', add libRNRSA.a.
## Example Usage

@@ -40,0 +35,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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