Skip to content

Encode Base58

Naser edited this page Mar 27, 2023 · 1 revision

The nhash encode base58 command is used to encode or decode text in Base58 format.

Usage

nhash encode base58 <text> [options]

Arguments

  • <text>: Text to encode or decode in Base58 format.

Options

  • -d, --decode: Decodes the Base58 text instead of encoding it.
  • -o, --output <output>: File name to write the output to.
  • -?, -h, --help: Show help and usage information.

Examples

  1. Encoding a string in Base58:
nhash encode base58 "Hello, World"

Output:

2NEpo7TZsLBYdvo5V
  1. Decoding a Base58 string:
nhash encode base58 "2NEpo7TZsLBYdvo5V" -d

Output:

Hello, World!
  1. Encoding a string and writing the output to a file:
nhash encode base58 "Hello, World" --output encoded.txt

Output:

The encoded text is written to the encoded.txt file.

  1. Decoding a Base58 string and writing the output to a file:
nhash encode b58 "StV1DL6CwTryKyV" -d -o decoded.txt

Output:

The decoded text is written to the decoded.txt file.

Clone this wiki locally