Sha256: 457906d63361d60ce277032cde5594661abd71c0b6856a7da37183f22e5da05c

Contents?: true

Size: 461 Bytes

Versions: 4

Compression:

Stored size: 461 Bytes

Contents

# -*- coding: utf-8 -*-
# vim:ft=ruby:enc=utf-8

# Any Object can be a password, as long as it has a string representation.
#
# This Module provides a shortcut to the password-conversion.
#
#   String.send(:include, ToPass::Integration)
#   puts "Da steht ein Pferd auf dem Flur".to_pass => 'Ds1P@dF'
#
module ToPass::Integration
  # simplified password-creation
  def to_pass( algorithm = 'basic_de' )
    ToPass::Base.new(self.to_s, algorithm).to_s
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
to_pass-0.5.2 lib/to_pass/integration.rb
to_pass-0.5.0 lib/to_pass/integration.rb
to_pass-0.4.0 lib/to_pass/integration.rb
to_pass-0.2.4 lib/to_pass/integration.rb