Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PackageVerificationCode.md #699

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 15 additions & 18 deletions model/Core/Classes/PackageVerificationCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,18 @@ This identifier enables a recipient to determine if any file in the original pac

Algorithm:

verificationcode = 0

filelist = templist = ""

for all files in the package {

if file is an "excludes" file, skip it /* exclude SPDX analysis file(s) */

append templist with "SHA1(file)/n"
verificationcode = 0
filelist = templist = ""
for all files in the package {
if file is an "excludes" file, skip it /* exclude SPDX analysis file(s) */
else append templist with "algorithm(file)/n"
}

}

sort templist in ascending order by SHA1 value

filelist = templist with "/n"s removed. /* ordered sequence of SHA1 values with no separators */

verificationcode = SHA1(filelist)

Where SHA1(file) applies a SHA1 algorithm on the contents of file and returns the result in lowercase hexadecimal digits.
sort templist in ascending order by algorithm value

filelist = templist with "/n"s removed. /* ordered sequence of algorithm values with no separators */

hashValue = algorithm(filelist) /* Where algorithm(file) applies a hash algorithm on the contents of file and returns the result in lowercase hexadecimal digits. */

Required sort order: '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' (ASCII order)

Expand All @@ -47,6 +40,10 @@ Required sort order: '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e'

## Properties

- algorithm
- type: HashAlgorithm
- minCount: 1
- maxCount: 1
- hashValue
- type: xsd:string
- minCount: 1
Expand Down