1.0.38 • Published 1 year ago

@connectiv-ms/confidential v1.0.38

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

conFidential CLI

Description

This command line interface is a wrapper around the conFidential library. You can encrypt and decrypt passwords using the default keys and salt values used by connectiv. If you want to use this in a project, please refer to the conFidential library documentation instead.

These algorithms are supported so far:

AlgorithmEncryptionDecryption
RijndaelManagedyesyes
Aesyesyes

The current default algorithm is RijndaelManaged.

Installation

Make sure, that you do not install both, the NPM and the dotnet version!

dotnet CLI

You can use the dotnet tool CLI to install this application.

dotnet tool install --global Connectiv.ConFidential.Cli

NPM

You can use NPM to install this application

npm install -g @connectiv-ms/confidential

If you do not want to install the tool, you can also run npx @connectiv-ms/confidential -- [All Parameters go here] to run it once.

Usage

After installation, the tool can be invoked in the terminal via the command

confidential

The command arguments need to be structured as follows:

confidential [command] [arguments] [options]

  • If values are supplied, that contain spaces, they must be escaped by quotes: "value with spaces".
  • Commands need to be entered before all other parameters using their name.
  • Arguments need to be entered after the command but before any of the options. Arguments can be provided by value and do not need to be named explicitly. However, the position of the argument needs to be respected. If an argument is described as optional in the table below, it may be omitted. No argument may follow after an omitted argument.
  • Options need to be entered after all other parameters. To supply an option, you can specify the explicit name preceeded by two dashes (Ex.: --optionName value), or - if available - the abbreviated name with one dash (-o value). If an option is a boolean value, it is called a flag. No values need to be supplied for flags. If the flag is supplied (--flagName or -f), the value will be interpreted as true, if the flag is omitted from the call, it will be interpreted as false.

All available commands, arguments and options will be described below.

Commands

encrypt

Arguments

ArgumentPositionOptionalDescription
value1yesIf a value is provided, the value will be encrypted and outputted back to the console. This is not recommended, as it will potentially expose the value. If no value is provided, the application will prompt for an unencrypted password instead. The input is masked, so you may enter it when other people are watching.

Options

OptionAbbreviationDescription
algorithmN/ACan be any of the algorithm names mentioned in the description.

decrypt

ArgumentPositionOptionalDescription
value1yesIf a value is provided, the value will be decrypted and outputted back to the console. The password will be visible in plain text, so make sure that you are in a safe environment. If no value is provided, the application will prompt for an encrypted password instead.
OptionAbbreviationDescription
algorithmN/ACan be any of the algorithm names mentioned in the description.

Example calls

// Encrypt a password using Aes
confidential encrypt --algorithm Aes
> Enter password: ***********
> 3nCryp73dH3110W0r1d

// Encrypt hello world using the default algorithm
confidential encrypt "hello world"
> 3nCryp73dH3110W0r1d

// Decrypt hello world using Aes
confidential decrypt "3nCryp73dH3110W0r1d" --algorithm Aes
> hello world
1.0.38

1 year ago

1.0.37-rc.0

1 year ago

1.0.37

1 year ago

1.0.34-rc.0

2 years ago

1.0.33-rc.0

2 years ago

1.0.31-rc.0

2 years ago

1.0.30-rc.1

2 years ago

1.0.30-rc.0

2 years ago