struct V1::Hash

Overview

Hash is an unqualified digest of some content, e.g. sha256:deadbeef

Defined in:

v1/hash.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(algorithm, hex) #

[View source]
def self.new(h : String) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Class Method Detail

def self.empty #

[View source]
def self.from_json(pull : JSON::PullParser) #

[View source]
def self.hasher(name : String) #

[View source]
def self.sha256(r : IO) #

[View source]
def self.to_json(h : Hash, json : JSON::Builder) #

[View source]
def self.to_json(json : JSON::Builder) #

[View source]

Instance Method Detail

def algorithm : String #

Algorithm holds the algorithm used to compute the hash.


[View source]
def hex : String #

Hex holds the hex portion of the content hash.


[View source]
def to_s #

[View source]