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

SHA Family of Patterns #29

Open
GeekMasher opened this issue Dec 12, 2022 · 1 comment
Open

SHA Family of Patterns #29

GeekMasher opened this issue Dec 12, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@GeekMasher
Copy link
Collaborator

Name / Description

SHA Family hashing functions outputs

Sample Snippets

True Positives

# SHA1
a94a8fe5ccb19ba61c4c0873d391e987982fbbd3

# SHA224
90a3ed9e32b2aaf4c61c410eb925426119e1a9dc53d4286ade99a809

# SHA256
f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2

# SHA384
768412320f7b0aa5812fce428dc4706b3cae50e02a64caa16a782249bfe8efc4b7ef1ccb126255d196047dfedf17a0a9

# SHA512
ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff

False Positives

# contains a `w` but correct length
a94a8fe5ccb19bw61c4c0873d391e987982fbbd3

[optional] Propose Solution

[suggestion]
@GeekMasher GeekMasher added the enhancement New feature or request label Dec 12, 2022
@GeekMasher GeekMasher self-assigned this Dec 12, 2022
@aegilops
Copy link
Collaborator

Their length in characters is:

  • SHA1: 40
  • SHA224: 56
  • SHA256: 64
  • SHA512: 128

So their regex are:

  • SHA1: [A-Fa-f0-9]{40}
  • SHA224: [A-Fa-f0-9]{56}
  • SHA256: [A-Fa-f0-9]{64}
  • SHA512: [A-Fa-f0-9]{128}

Each will have the same before/after pair of \A|[^A-Fa-f0-9] and \z|[^A-Fa-f0-9]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants