文件操作 - securerandom.rbs
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems/rbs-2.8.2/stdlib/securerandom/0/securerandom.rbs
编辑文件内容
# <!-- rdoc-file=lib/securerandom.rb --> # ## Secure random number generator interface. # # This library is an interface to secure random number generators which are # suitable for generating session keys in HTTP cookies, etc. # # You can use this library in your application by requiring it: # # require 'securerandom' # # It supports the following secure random number generators: # # * openssl # * /dev/urandom # * Win32 # # # SecureRandom is extended by the Random::Formatter module which defines the # following methods: # # * alphanumeric # * base64 # * choose # * gen_random # * hex # * rand # * random_bytes # * random_number # * urlsafe_base64 # * uuid # # # These methods are usable as class methods of SecureRandom such as # `SecureRandom.hex`. # # If a secure random number generator is not available, `NotImplementedError` is # raised. # module SecureRandom extend Random::Formatter def self.alphanumeric: (?Integer?) -> String def self.base64: (?Integer?) -> String def self.hex: (?Integer?) -> String def self.random_bytes: (?Integer?) -> String def self.random_number: () -> Float | (Integer) -> Integer | (Numeric) -> Numeric def self.urlsafe_base64: (?Integer?, ?bool?) -> String def self.uuid: () -> String end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件