ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - RijulGulati/go-andotp: CLI program to encrypt/decrypt andOTP files
CLI program to encrypt/decrypt andOTP files. Contribute to RijulGulati/go-andotp development by creating an account on GitHub.
Visit Site

GitHub - RijulGulati/go-andotp: CLI program to encrypt/decrypt andOTP files

GitHub - RijulGulati/go-andotp: CLI program to encrypt/decrypt andOTP files

go-andotp

CLI program to encrypt/decrypt andOTP files.

Installation

Download:

  • x86_64 Intel or AMD 64-Bit CPU
    curl -L "https://github.com/RijulGulati/go-andotp/releases/latest/download/go-andotp-linux-x86_64" \
         -o "go-andotp" && \
    chmod +x "go-andotp"
    
  • arm64 Arm-based 64-Bit CPU (i.e. in Raspberry Pi)
    curl -L "https://github.com/RijulGulati/go-andotp/releases/latest/download/go-andotp-linux-arm64" \
         -o "go-andotp" && \
    chmod +x "go-andotp"
    

To determine your OS version, run getconf LONG_BIT or uname -m at the command line.

Download:

  • x86_64 Intel 64-bit
    curl -L "https://github.com/RijulGulati/go-andotp/releases/latest/download/go-andotp-macos-x86_64" \
         -o "go-andotp" && \
    chmod +x "go-andotp"
    
  • arm64 Apple silicon 64-bit
    curl -L "https://github.com/RijulGulati/go-andotp/releases/latest/download/go-andotp-macos-arm64" \
         -o "go-andotp" && \
    chmod +x "go-andotp"
    

To determine your OS version, run uname -m at the command line.

Download:

  • x86_64 Intel or AMD 64-Bit CPU
    Invoke-WebRequest -Uri "https://github.com/RijulGulati/go-andotp/releases/latest/download/go-andotp-windows-x86_64.exe" -OutFile "go-andotp.exe"
    
  • arm64 Arm-based 64-Bit CPU
    Invoke-WebRequest -Uri "https://github.com/RijulGulati/go-andotp/releases/latest/download/go-andotp-windows-arm64.exe" -OutFile "go-andotp.exe"
    

To determine your OS version, run echo %PROCESSOR_ARCHITECTURE% at the command line.

go install github.com/grijul/go-andotp

Usage

Usage: go-andotp -i <INPUT_FILE> {-e|-d} [-o <OUT_FILE>] [-p PASSWORD]

  -d    Decrypt file
  -e    Encrypt file.
  -i string
        Input File
  -o string
        Output File. If no file is provided, output is printed to STDOUT
  -p string
        Encryption Password. This option can be skipped to get password prompt.

Examples

  • Encrypt JSON file (Password is asked after hitting Enter. Password is not echoed)
go-andotp -e -i file.json -o file.json.aes
  • Encrypt JSON file (Password is entered through CLI)
go-andotp -e -i file.json -o file.json.aes -p testpass
  • Decrypt JSON file
go-andotp -d -i file.aes.json -o file.json
  • Decrypt JSON file and print json to console
go-andotp -d -i file.aes.json

Using go-andotp as library

go-andotp can be used as library as well. It implements Encrypt() and Decrypt() functions to encrypt/decrypt text (respectively). It's documentation is available at: https://pkg.go.dev/github.com/grijul/go-andotp/andotp

Example usage:

import "github.com/grijul/go-andotp/andotp"

func main() {
    andotp.Encrypt(...)
    andotp.Decrypt(...)
}

Build

Compile go-andotp on your computer:

go build -o go-andotp main.go

To compile go-andotp for another platform please set the GOARCH and GOOS environmental variables. Example:

GOOS=windows GOARCH=amd64 go build -o go-andotp.exe main.go

To compile go-andotp for Windows, macOS and Linux you can use the script build.sh:

bash build.sh

More help: https://go.dev/doc/install/source#environment

License

MIT

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory