Puppet Function: complyadm::secure_random

Defined in:
lib/puppet/functions/complyadm/secure_random.rb
Function type:
Ruby 4.x API

Overview

complyadm::secure_random(Integer $length)String

Parameters:

  • length (Integer)

Returns:

  • (String)


2
3
4
5
6
7
8
9
10
# File 'lib/puppet/functions/complyadm/secure_random.rb', line 2

Puppet::Functions.create_function(:'complyadm::secure_random') do
  dispatch :secure_random do
    param 'Integer', :length
    return_type 'String'
  end
  def secure_random(length)
    SecureRandom.base64(length)
  end
end