Coder Social home page Coder Social logo

tokencodr's Introduction

tokencodr

Easily encrypt and decrypt authentication tokens


tokencodr provides functions to easily encrypt authentication files for both interactive and non-interactive usage using the sodium package. It was inspired by gargle, and much of the code is directly adapted from the secret_* family of functions used by gargle internally. The methods employed follow this vignette on securely managing tokens.

DISCLAIMER: I am not a security expert. The methods described in this package could potentially allow certain parties to access your authorization token(s) and, subsequently, your data. Use at your own risk.

Table of contents


Installation

You can install and load the development version of tokencodr from GitHub as follows:

# Install the development version from GitHub
if (!require("remotes")) install.packages("remotes")
remotes::install_github("jdtrat/tokencodr")

# Load package
library(tokencodr)

Getting Started

tokencodr has three functions:

Function Description Example Use
create_env_pw() This function accepts a 'service' argument, which would typically be a one-word description for the platform whose token you are attempting to encrypt. create_env_pw(service = "BOXREXAMPLE")
encrypt_token() Accepts the service specified in create_env_pw(), an input file, and the destination directory for where the encrypted file should be saved. encrypt_token(service = "BOXREXAMPLE", input = "~/private/local/path/to/my/jwt/file.json", destination = "~/Desktop/")
decrypt_token() Accepts the service name, path to encrypted token file, and a logical 'complete', indicating whether the file should be returned as raw bytes or as a character string with the decoded (original) contents. decrypt_token(service = "BOXREXAMPLE", path = "~/Desktop/.secret/BOXREXAMPLE", complete = TRUE)

Further Reading

For a more in-depth explanation of tokencodr, please see the vignette.

Feedback

If you want to see a feature, or report a bug, please file an issue or open a pull-request! As this package is just getting off the ground, we welcome all feedback and contributions. See our contribution guidelines for more details on getting involved!

Code of Conduct

Please note that the tokencodr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

tokencodr's People

Contributors

jdtrat avatar

Stargazers

HARESH SUPPIAH avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.