chef-partners/passwordmasker

Name: passwordmasker

Owner: Chef Partners

Description: Ruby gem for storing a password but returning a masked value for console, debug, and log purposes.

Created: 2015-09-17 17:00:25.0

Updated: 2018-03-01 23:55:24.0

Pushed: 2016-02-03 15:22:49.0

Homepage: null

Size: 10

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

PasswordMasker

PasswordMasker provides a class that stores a password or other secure string (like an authorization token) and overrides the #inspect and #to_s methods to ensure you don't display your password in a terminal, log, or debug environment.

Installation

Add this line to your application's Gemfile:

'passwordmasker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install passwordmasker
Usage
main):001:0> masker = PasswordMasker.new('sooperseekret')
*******
main):002:0> masker.to_s
********"
main):003:0> masker.inspect
********"
main):004:0> masker.value
sooperseekret"
License and Authors

Author:: Chef Partner Engineering (partnereng@chef.io)

Copyright:: Copyright (c) 2015 Chef Software, Inc.

License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributing
  1. Fork it ( https://github.com/[my-github-username]/vmware-vra-gem/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.