diff options
author | Paulo Gomes <pjbgf@linux.com> | 2023-03-07 22:33:55 +0000 |
---|---|---|
committer | Paulo Gomes <pjbgf@linux.com> | 2023-03-07 22:33:55 +0000 |
commit | 02494219682689ccfae6d4ffed2734509eed02d0 (patch) | |
tree | 9f9d60c45ad622798b79e61f6140794b0d847521 /plumbing/hash/hash_sha1.go | |
parent | 8557a36bc5b1b154c02f6d1deef68fc21f04b128 (diff) | |
download | go-git-02494219682689ccfae6d4ffed2734509eed02d0.tar.gz |
plumbing/hash: Add SHA256 as a supported algorithm
Relates to #706.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
Diffstat (limited to 'plumbing/hash/hash_sha1.go')
-rw-r--r-- | plumbing/hash/hash_sha1.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plumbing/hash/hash_sha1.go b/plumbing/hash/hash_sha1.go new file mode 100644 index 0000000..e3cb60f --- /dev/null +++ b/plumbing/hash/hash_sha1.go @@ -0,0 +1,15 @@ +//go:build !sha256 +// +build !sha256 + +package hash + +import "crypto" + +const ( + // CryptoType defines what hash algorithm is being used. + CryptoType = crypto.SHA1 + // Size defines the amount of bytes the hash yields. + Size = 20 + // HexSize defines the strings size of the hash when represented in hexadecimal. + HexSize = 40 +) |