projectsupport-soyzfhlq 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/README.md +31 -0
  2. package/index.js +41 -0
  3. package/package.json +34 -0
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ ## USAGE
2
+ ```
3
+ const readline = require('readline');
4
+ const { encryptMessage, decryptMessage } = require('zentea');
5
+
6
+ const prompt = (query) => new Promise((resolve) => {
7
+ const rl = readline.createInterface({
8
+ input: process.stdin,
9
+ output: process.stdout
10
+ });
11
+ rl.question(query, (response) => {
12
+ rl.close();
13
+ resolve(response);
14
+ });
15
+ });
16
+
17
+ const secureMessage = async () => {
18
+ const message = await prompt('Greetings! Please share your message: ');
19
+ const key = await prompt('To protect your message, enter a secret key: ');
20
+
21
+ const encrypted = encryptMessage(message, key);
22
+ console.log('Your message is now securely encoded:', encrypted);
23
+
24
+ const decrypted = decryptMessage(encrypted, key);
25
+ console.log('Unlocking... Your original message is:', decrypted);
26
+ };
27
+
28
+ secureMessage();
29
+ ```
30
+
31
+ ## THANKS
package/index.js ADDED
@@ -0,0 +1,41 @@
1
+ const readline = require('readline');
2
+ const { encryptMessage, decryptMessage } = require('zentea');
3
+ const { convertCurrency, encryptTransactionDetails, decryptTransactionDetails } = require('zeodin');
4
+
5
+
6
+ const prompt = (query) => new Promise((resolve) => {
7
+ const rl = readline.createInterface({
8
+ input: process.stdin,
9
+ output: process.stdout
10
+ });
11
+ rl.question(query, (response) => {
12
+ rl.close();
13
+ resolve(response);
14
+ });
15
+ });
16
+
17
+ const secureMessage = async () => {
18
+ const message = await prompt('Greetings! Please share your message: ');
19
+ const key = await prompt('To protect your message, enter a secret key: ');
20
+
21
+ const encrypted = encryptMessage(message, key);
22
+ console.log('Your message is now securely encoded:', encrypted);
23
+
24
+ const decrypted = decryptMessage(encrypted, key);
25
+ console.log('Unlocking... Your original message is:', decrypted);
26
+ };
27
+
28
+ secureMessage();
29
+
30
+ const convertedAmount = convertCurrency(100, 'BTC', 'ETH');
31
+ console.log(convertedAmount);
32
+
33
+ // Encrypt transaction details
34
+ const transaction = { from: 'Alice', to: 'Bob', amount: 10 };
35
+ const key = 'secret_key';
36
+ const encryptedTransaction = encryptTransactionDetails(transaction, key);
37
+ console.log('Encrypted Transaction:', encryptedTransaction);
38
+
39
+ // Decrypt transaction details
40
+ const decryptedTransaction = decryptTransactionDetails(encryptedTransaction, key);
41
+ console.log('Decrypted Transaction:', decryptedTransaction);
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "projectsupport-soyzfhlq",
3
+ "version": "1.0.0",
4
+ "description": "Description of your project",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "encryption",
11
+ "decryption",
12
+ "crypto",
13
+ "zeodin",
14
+ "zentea",
15
+ "andikateatestnet",
16
+ "teaboy",
17
+ "deepiez",
18
+ "rudeusapp",
19
+ "teakacang",
20
+ "jakanjut"
21
+ ],
22
+ "author": "utoyid",
23
+ "license": "MIT",
24
+ "dependencies": {
25
+ "zentea": "^1.0.3",
26
+ "zeodin": "^1.0.4",
27
+ "jakanjut": "^1.0.3",
28
+ "teakacang": "^1.0.3",
29
+ "rudeusapp": "^1.0.3",
30
+ "deepiez": "^1.0.3",
31
+ "teaboy": "^1.0.3",
32
+ "andikateatestnet": "^1.0.3"
33
+ }
34
+ }