Skip to content

naming inconsistency sha512 versus sha256 #4

@ElectricNroff

Description

@ElectricNroff

for https://github.com/dwelch2344/cve-ref-archival/blob/24ca51169ff07766fc5d35a2ab3bc8b2a47c195c/src/engine/cve/processor.ts#L170-L179

 * Reads the bytes of a file and returns with a sha256
 * @param file 
 * @returns 
 */
async function readAsset(file: string) {
  const bytes = await fs.readFile(file)
  const hash = crypto.createHash('sha512')
  hash.write(bytes)
  await new Promise(r => hash.end(r))
  const sha256 = hash.digest('hex')

This uses the sha512 hash algorithm but mentions sha256 in a number of places,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions