Description
Split a restricted package-integrity token.
Integrity metadata describes an algorithm and expected bytes or an object-ID prefix. Recognizing its written shape is separate from computing a digest, verifying content or establishing the uniqueness of an abbreviated object name.
Split a restricted package-integrity token.
When to use this tool
Use Development: Package Manager Integrity Token Split when inspecting an integrity-related token without accessing its content.
How to use the tool and how it works
- Enter token. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Split a restricted package-integrity token. Accept sha256/sha384/sha512, a hyphen and Base64-looking digest with up to two trailing equals signs and length divisible by four.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| token | Token | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned object; expand its named members below. | Required. Object. |
| result.algorithm | Algorithm | Calculated result member: string. |
| result.digestBase64 | Shape-checked Base64 text; digest bytes, required hash length and canonical pad bits are not verified. | Calculated result member: string. |
{
"input": {
"token": "sha256-YWJj"
},
"output": {
"result": {
"algorithm": "sha256",
"digestBase64": "YWJj"
}
}
} Limitations and assumptions
- This checks token shape, not digest size, canonical pad bits, file bytes or cryptographic integrity.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a suitable cryptographic implementation or Git repository lookup to verify bytes, identity and uniqueness.
References
Similar or alternative tools
- npm Package Tag Selector Split
Split a package selector at its required name-selector boundary.
- Package JSON License SPDX Prefix
Inspect a package license value for an external license-file phrase.