wfexs_backend.utils.digests#

Module Contents#

Functions#

stringifyDigest

unstringifyDigest

hexDigest

stringifyFilenameDigest

nullProcessDigest

nihDigester

ComputeDigestFromObject

Accessory method used to compute the digest of an input file-like object

ComputeDigestFromFileLike

Accessory method used to compute the digest of an input file-like object

ComputeDigestFromFile

Accessory method used to compute the digest of an input file

compute_sha1_git_from_stream

compute_sha1_git_from_file

compute_sha1_git_from_bytes

compute_sha1_git_from_string

process_dir_entries

compute_sha1_git_from_dir

compute_sha1_git_from_any

scantree

Recursively yield DirEntry objects for given directory.

ComputeDigestFromDirectory

Accessory method used to compute the digest of an input directory, based on the names and digest of the files in the directory

ComputeDigestFromGeneratedContentList

Accessory method used to compute the digest of an input directory, based on the names and digest of the files in the directory

Data#

API#

wfexs_backend.utils.digests.DEFAULT_DIGEST_ALGORITHM = 'sha256'#
wfexs_backend.utils.digests.DEFAULT_DIGEST_BUFFER_SIZE = 65536#
wfexs_backend.utils.digests.stringifyDigest(digestAlgorithm: str, digest: bytes) wfexs_backend.common.Fingerprint#
wfexs_backend.utils.digests.unstringifyDigest(digestion: wfexs_backend.common.Fingerprint) Tuple[bytes, str]#
wfexs_backend.utils.digests.hexDigest(digestAlgorithm: str, digest: wfexs_backend.utils.digests.Hexable) wfexs_backend.common.Fingerprint#
wfexs_backend.utils.digests.stringifyFilenameDigest(digestAlgorithm: str, digest: bytes) wfexs_backend.common.Fingerprint#
wfexs_backend.utils.digests.nullProcessDigest(digestAlgorithm: str, digest: bytes) bytes#
wfexs_backend.utils.digests.VALID_NI_ALGOS: Mapping[str, str] = None#
wfexs_backend.utils.digests.nihDigester(digestAlgorithm: str, digest: bytes) wfexs_backend.common.Fingerprint#
wfexs_backend.utils.digests.ComputeDigestFromObject(obj: Any, digestAlgorithm: str = DEFAULT_DIGEST_ALGORITHM, repMethod: FingerprintMethod | RawFingerprintMethod = stringifyDigest) Fingerprint | bytes#

Accessory method used to compute the digest of an input file-like object

wfexs_backend.utils.digests.ComputeDigestFromFileLike(filelike: IO[bytes], digestAlgorithm: str = DEFAULT_DIGEST_ALGORITHM, bufferSize: int = DEFAULT_DIGEST_BUFFER_SIZE, repMethod: FingerprintMethod | RawFingerprintMethod = stringifyDigest) Fingerprint | bytes#

Accessory method used to compute the digest of an input file-like object

wfexs_backend.utils.digests.ComputeDigestFromFile(filename: wfexs_backend.common.PathLikePath, digestAlgorithm: str = DEFAULT_DIGEST_ALGORITHM, bufferSize: int = DEFAULT_DIGEST_BUFFER_SIZE, repMethod: FingerprintMethod | RawFingerprintMethod = stringifyDigest) Fingerprint | bytes | None#

Accessory method used to compute the digest of an input file

wfexs_backend.utils.digests.compute_sha1_git_from_stream(stream: IO[bytes], length: int, buffer_size: int = DEFAULT_DIGEST_BUFFER_SIZE) hashlib._Hash#
wfexs_backend.utils.digests.compute_sha1_git_from_file(filename: str) hashlib._Hash#
wfexs_backend.utils.digests.compute_sha1_git_from_bytes(the_bytes: bytes) hashlib._Hash#
wfexs_backend.utils.digests.compute_sha1_git_from_string(the_string: str) hashlib._Hash#
wfexs_backend.utils.digests.process_dir_entries(dirname: str) Iterator[Tuple[bytes, hashlib._Hash, bytes, bool]]#
wfexs_backend.utils.digests.compute_sha1_git_from_dir(dirname: str) hashlib._Hash#
wfexs_backend.utils.digests.compute_sha1_git_from_any(path: str) Tuple[str, str]#
wfexs_backend.utils.digests.scantree(path: wfexs_backend.common.PathLikePath) Iterator[os.DirEntry[str]]#

Recursively yield DirEntry objects for given directory.

wfexs_backend.utils.digests.ComputeDigestFromDirectory(dirname: wfexs_backend.common.PathLikePath, digestAlgorithm: str = DEFAULT_DIGEST_ALGORITHM, bufferSize: int = DEFAULT_DIGEST_BUFFER_SIZE, repMethod: wfexs_backend.utils.digests.FingerprintMethod = stringifyDigest) wfexs_backend.common.Fingerprint#

Accessory method used to compute the digest of an input directory, based on the names and digest of the files in the directory

wfexs_backend.utils.digests.ComputeDigestFromGeneratedContentList(dirname: wfexs_backend.common.PathLikePath, theValues: Sequence[AbstractGeneratedContent], digestAlgorithm: str = DEFAULT_DIGEST_ALGORITHM, bufferSize: int = DEFAULT_DIGEST_BUFFER_SIZE, repMethod: wfexs_backend.utils.digests.FingerprintMethod = stringifyDigest) wfexs_backend.common.Fingerprint#

Accessory method used to compute the digest of an input directory, based on the names and digest of the files in the directory