Sha256: 7e16fe7dc1a702f7828468dc8bf028b5241959d37e40d8e1a22cbe6d483fb364
Contents?: true
Size: 364 Bytes
Versions: 32
Compression:
Stored size: 364 Bytes
Contents
# frozen_string_literal: true class Puppet::SSL::Digest attr_reader :digest def initialize(algorithm, content) algorithm ||= 'SHA256' @digest = OpenSSL::Digest.new(algorithm, content) end def to_s "(#{name}) #{to_hex}" end def to_hex @digest.hexdigest.scan(/../).join(':').upcase end def name @digest.name.upcase end end
Version data entries
32 entries across 32 versions & 1 rubygems