crypto

package
v2.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package crypto provides cryptographic operations for package building.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateSHA256

func CalculateSHA256(path string) ([]byte, error)

CalculateSHA256 calculates the SHA-256 checksum of a file. This consolidates the SHA256 calculation logic from osutils and fileutils.

func CalculateSHA256FromReader

func CalculateSHA256FromReader(reader io.Reader) ([]byte, error)

CalculateSHA256FromReader calculates SHA256 from an io.Reader. This is useful for calculating hashes of data streams.

func VerifySHA256

func VerifySHA256(path string, expectedHash []byte) (bool, error)

VerifySHA256 verifies that a file matches the given SHA256 hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL