New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

secure-flow

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-flow - npm Package Compare versions

Comparing version 1.0.4-beta.4 to 1.0.4-beta.5

2

dist/loadConfig.js

@@ -22,3 +22,3 @@ "use strict";

const customConfig = require(customConfigPath).default || require(customConfigPath);
return Object.assign(Object.assign({}, config_js_1.defaultConfig), customConfig);
return { ...config_js_1.defaultConfig, ...customConfig };
}

@@ -25,0 +25,0 @@ else {

{
"name": "secure-flow",
"version": "1.0.4-beta.4",
"version": "1.0.4-beta.5",
"description": "Secure Flow is a lightweight TypeScript utility package for encryption and decryption using the AES-256-CBC algorithm. This package simplifies the process of securely encrypting and decrypting text, making it easy to integrate strong encryption into your Node.js applications.",

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

@@ -1,9 +0,7 @@

## SecureFlow Configuration Generator
## SecureFlow
The SecureFlow Configuration Generator (`create-secureflow-config`) is a command-line tool that allows you to quickly create a configuration file for SecureFlow. This configuration file includes encryption settings required for SecureFlow to securely encrypt and decrypt data.
The secure-flow provides the functionality for encrypting and decrypting text using the Node.js crypto module, with configurations loaded from a specified source.
## Installation
You can install the `create-secureflow-config` package globally using npm or yarn:
```bash

@@ -15,10 +13,13 @@ npm install -g secure-flow

Usage
## Usage
Once installed, you can run the following command to generate the secureflow.config.ts file in your current working directory:
```bash
create-secureflow-config
npx create-secureflow-config
# or
npx create-secureflow-config --typescript
```
This will create a file named secureflow.config.ts with the following content:
This will create a file named secureflow.config.ts or .js file with the following content:

@@ -33,24 +34,28 @@ ```typescript

## Configuration
And you can import the encrypt or decrypt methods:
encryptionAlgorithm: The encryption algorithm used by SecureFlow. Default is 'aes-256-cbc'.
encryptionKey: A 32-character string used as the encryption key. Replace 'your-32-character-encryption-key' with your actual encryption key.
iv: Initialization Vector (IV) used for encryption. Should be a 16-character Buffer. Replace 'your-16-character-iv' with your actual IV.
```typescript
import { encrypt, decrypt } from "secure-flow";
```
## Example
## Example usage with Express
Here's an example of how to use the generated secureflow.config.ts file in your SecureFlow application:
```typescript
// secureflow.config.ts
module.exports = {
encryptionAlgorithm: "aes-256-cbc",
encryptionKey: "your-32-character-encryption-key",
iv: Buffer.from("your-16-character-iv"),
};
app.get("/encrypt", (req, res) => {
const data = JSON.stringify({ data: "Hello, World!" });
res.status(200).json(encrypt(data));
});
// Your SecureFlow application
import { config } from "./secureflow.config";
app.get("/decrypt", (req, res) => {
const data = req.body;
res.status(200).json(decrypt(data));
});
```
## Configuration
encryptionAlgorithm: The encryption algorithm used by SecureFlow. Default is 'aes-256-cbc'.
encryptionKey: A 32-character string used as the encryption key. Replace 'your-32-character-encryption-key' with your actual encryption key.
iv: Initialization Vector (IV) used for encryption. Should be a 16-character Buffer. Replace 'your-16-character-iv' with your actual IV.
## License

@@ -57,0 +62,0 @@

@@ -5,3 +5,3 @@ {

"outDir": "dist",
"target": "ES6",
"target": "ES2020",
"module": "CommonJS",

@@ -8,0 +8,0 @@ "moduleResolution": "Node",

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