Commit 6c13128d authored by mark burdett's avatar mark burdett
Browse files

Issue #3088648 by mfb, beeyayjay: Add SHA-512 et al. to list of available hashing algorithms

parent 38d7fea3
Loading
Loading
Loading
Loading
+3 −2
Changes for README.txt: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -9,8 +9,9 @@ archive.org to wikileaks.org, allow files to be uniquely identified, allow
duplicate files to be detected, and allow copies to be verified against the
original source.

File Hash module generates and stores MD5, SHA-1 and/or SHA-256 hashes for each
file uploaded to the site.
File Hash module generates and stores hashes for each file uploaded to the site.
The MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512/224, SHA-512/256, SHA-512,
SHA3-224, SHA3-256, SHA3-384 and SHA3-512 hash algorithms are supported.

REQUIREMENTS
------------
+14 −2
Changes for config/install/filehash.settings.yml: 14 added lines, 2 removed lines.
Original line number Diff line number Diff line
algos: {  }
dedupe: FALSE
algos:
  md5: '0'
  sha1: '0'
  sha224: '0'
  sha256: '0'
  sha384: '0'
  sha512_224: '0'
  sha512_256: '0'
  sha512: '0'
  sha3_224: '0'
  sha3_256: '0'
  sha3_384: '0'
  sha3_512: '0'
dedupe: false
+27 −0
Changes for config/schema/filehash.schema.yml: 27 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,9 +12,36 @@ filehash.settings:
        sha1:
          type: string
          label: 'SHA-1'
        sha224:
          type: string
          label: 'SHA-224'
        sha256:
          type: string
          label: 'SHA-256'
        sha384:
          type: string
          label: 'SHA-384'
        sha512_224:
          type: string
          label: 'SHA-512/224'
        sha512_256:
          type: string
          label: 'SHA-512/256'
        sha512:
          type: string
          label: 'SHA-512'
        sha3_224:
          type: string
          label: 'SHA3-224'
        sha3_256:
          type: string
          label: 'SHA3-256'
        sha3_384:
          type: string
          label: 'SHA3-384'
        sha3_512:
          type: string
          label: 'SHA3-512'
    dedupe:
      type: boolean
      label: 'Disallow duplicate files'
+0 −23
Changes for filehash.install: 0 added lines, 23 removed lines.
Original line number Diff line number Diff line
@@ -18,31 +18,8 @@ function filehash_schema() {
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'md5' => [
        'description' => 'MD5 hash for this file.',
        'type' => 'varchar_ascii',
        'length' => 32,
        'not null' => FALSE,
      ],
      'sha1' => [
        'description' => 'SHA-1 hash for this file.',
        'type' => 'varchar_ascii',
        'length' => 40,
        'not null' => FALSE,
      ],
      'sha256' => [
        'description' => 'SHA-256 hash for this file.',
        'type' => 'varchar_ascii',
        'length' => 64,
        'not null' => FALSE,
      ],
    ],
    'primary key' => ['fid'],
    'indexes' => [
      'md5_idx' => ['md5'],
      'sha1_idx' => ['sha1'],
      'sha256_idx' => ['sha256'],
    ],
    'foreign keys' => [
      'fid' => [
        'table' => 'file_managed',
+5 −0
Changes for filehash.links.task.yml: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,3 +7,8 @@ filehash.generate:
  route_name: filehash.generate
  title: Generate
  base_route: filehash.admin

filehash.clean:
  route_name: filehash.clean
  title: Clean up
  base_route: filehash.admin
Loading