Module: Dhall::Parser::Hash

Defined in:
lib/dhall/parser.rb

Instance Method Summary collapse

Instance Method Details

#valueObject



524
525
526
527
528
529
530
531
532
# File 'lib/dhall/parser.rb', line 524

def value
	protocol, data = string.split(/:/, 2)
	Dhall::Import::IntegrityCheck.new(
		code:   Multihashes::TABLE.key(
			protocol.sub(/\Asha(\d{3})/, "sha2-\\1")
		),
		digest: [data].pack("H*")
	)
end