aboutsummaryrefslogtreecommitdiff
path: root/spdx/checksum.go
diff options
context:
space:
mode:
Diffstat (limited to 'spdx/checksum.go')
-rw-r--r--spdx/checksum.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/spdx/checksum.go b/spdx/checksum.go
index 872aee2..3295969 100644
--- a/spdx/checksum.go
+++ b/spdx/checksum.go
@@ -2,25 +2,25 @@
package spdx
-// ChecksumAlgorithm2_2 represents the algorithm used to generate the file checksum in the Checksum2_2 struct.
+// ChecksumAlgorithm represents the algorithm used to generate the file checksum in the Checksum struct.
type ChecksumAlgorithm string
// The checksum algorithms mentioned in the spdxv2.2.0 https://spdx.github.io/spdx-spec/4-file-information/#44-file-checksum
const (
SHA224 ChecksumAlgorithm = "SHA224"
- SHA1 = "SHA1"
- SHA256 = "SHA256"
- SHA384 = "SHA384"
- SHA512 = "SHA512"
- MD2 = "MD2"
- MD4 = "MD4"
- MD5 = "MD5"
- MD6 = "MD6"
+ SHA1 ChecksumAlgorithm = "SHA1"
+ SHA256 ChecksumAlgorithm = "SHA256"
+ SHA384 ChecksumAlgorithm = "SHA384"
+ SHA512 ChecksumAlgorithm = "SHA512"
+ MD2 ChecksumAlgorithm = "MD2"
+ MD4 ChecksumAlgorithm = "MD4"
+ MD5 ChecksumAlgorithm = "MD5"
+ MD6 ChecksumAlgorithm = "MD6"
)
-//Checksum2_2 struct Provide a unique identifier to match analysis information on each specific file in a package.
-// The Algorithm field describes the ChecksumAlgorithm2_2 used and the Value represents the file checksum
+// Checksum provides a unique identifier to match analysis information on each specific file in a package.
+// The Algorithm field describes the ChecksumAlgorithm used and the Value represents the file checksum
type Checksum struct {
- Algorithm ChecksumAlgorithm
- Value string
+ Algorithm ChecksumAlgorithm `json:"algorithm"`
+ Value string `json:"checksumValue"`
}