🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

react-native-turbo-encryption

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-turbo-encryption - npm Package Compare versions

Comparing version

to
0.1.6

@@ -7,12 +7,18 @@ "use strict";

exports.decrypt = decrypt;
exports.decryptAsync = decryptAsync;
exports.encrypt = encrypt;
exports.encryptAsync = encryptAsync;
const TurboEncryption = require('./NativeTurboEncryption').default;
function encrypt(plainText, key) {
console.log(key.length);
return TurboEncryption.encrypt(plainText, key);
}
function decrypt(encryptedText, key) {
console.log(key.length);
return TurboEncryption.decrypt(encryptedText, key);
}
function encryptAsync(plainText, key) {
return TurboEncryption.encryptAsync(plainText, key);
}
function decryptAsync(encryptedText, key) {
return TurboEncryption.decryptAsync(encryptedText, key);
}
//# sourceMappingURL=index.js.map

@@ -5,9 +5,13 @@ "use strict";

export function encrypt(plainText, key) {
console.log(key.length);
return TurboEncryption.encrypt(plainText, key);
}
export function decrypt(encryptedText, key) {
console.log(key.length);
return TurboEncryption.decrypt(encryptedText, key);
}
export function encryptAsync(plainText, key) {
return TurboEncryption.encryptAsync(plainText, key);
}
export function decryptAsync(encryptedText, key) {
return TurboEncryption.decryptAsync(encryptedText, key);
}
//# sourceMappingURL=index.js.map
export declare function encrypt(plainText: string, key: string): string;
export declare function decrypt(encryptedText: string, key: string): string;
export declare function encryptAsync(plainText: string, key: string): Promise<string>;
export declare function decryptAsync(encryptedText: string, key: string): Promise<string>;
//# sourceMappingURL=index.d.ts.map

@@ -5,2 +5,4 @@ import type { TurboModule } from 'react-native';

decrypt(encryptedText: string, key: string): string;
decryptAsync(encryptedText: string, key: string): Promise<string>;
encryptAsync(plainText: string, key: string): Promise<string>;
}

@@ -7,0 +9,0 @@ declare const _default: Spec;

export declare function encrypt(plainText: string, key: string): string;
export declare function decrypt(encryptedText: string, key: string): string;
export declare function encryptAsync(plainText: string, key: string): Promise<string>;
export declare function decryptAsync(encryptedText: string, key: string): Promise<string>;
//# sourceMappingURL=index.d.ts.map

@@ -5,2 +5,4 @@ import type { TurboModule } from 'react-native';

decrypt(encryptedText: string, key: string): string;
decryptAsync(encryptedText: string, key: string): Promise<string>;
encryptAsync(plainText: string, key: string): Promise<string>;
}

@@ -7,0 +9,0 @@ declare const _default: Spec;

{
"name": "react-native-turbo-encryption",
"version": "0.1.5",
"version": "0.1.6",
"description": "A superfast encryption module for React native",

@@ -5,0 +5,0 @@ "source": "./src/index.tsx",

@@ -12,2 +12,3 @@ # react-native-turbo-encryption

- 🔥 Lightweight
- 🚀 Supports Both **async and sync** methods

@@ -24,10 +25,12 @@ ## Installation

```js
import { decrypt , encrypt } from 'react-native-turbo-encryption';
import { decrypt , encrypt, encryptAsync, decryptAsync } from 'react-native-turbo-encryption';
const key = "mysecurekey12345"
const encryptedResult = encrypt("DSP Siraj is the best batsman in the world", key);
const encryptedResultAsync = await encryptAsync("DSP Siraj is the best batsman in the world", key); //Async way
// encryptedResult -> 64672edc4828c8f5f8940715f44a012b90f659a20e46e76cb9731348ea6ff408b60198054da3e49ba3d566634fa122e6
const decryptedResult = decrypt(encryptedResult, key);
const decryptedResultAsync = await decryptAsync(encryptedResultAsync, key);//Async way
// decryptedResult -> "DSP Siraj is the best batsman in the world"

@@ -52,7 +55,3 @@ ```

#### Thanks [Yash Parwani](https://github.com/Yash-Parwani) for the key length fix
## License
---

@@ -7,4 +7,6 @@ import type { TurboModule } from 'react-native';

decrypt(encryptedText: string, key: string): string;
decryptAsync(encryptedText: string, key: string): Promise<string>;
encryptAsync(plainText: string, key: string): Promise<string>;
}
export default TurboModuleRegistry.getEnforcing<Spec>('TurboEncryption');

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

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

Sorry, the diff of this file is not supported yet