Puppet Function: wmflib::autogen_password
- Defined in:
-
modules/wmflib/lib/puppet/functions/wmflib/autogen_password.rb
- Function type:
- Ruby 4.x API
Overview
wmflib::autogen_password(String $username, String $seed) ⇒ Any
2
3
4
5
6
7
8
9
10
11
12
13
|
# File 'modules/wmflib/lib/puppet/functions/wmflib/autogen_password.rb', line 2
Puppet::Functions.create_function(:'wmflib::autogen_password') do
dispatch :autogen_password do
param 'String', :username
param 'String', :seed
end
def autogen_password(username, seed)
Digest::SHA256.base64digest("#{seed}|||#{username}")[0..20]
end
end
|