Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implementing , Testing and documenting SHA-1 algorithm#1204

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
RgiriH wants to merge1 commit intotrekhleb:master
base:master
Choose a base branch
Loading
fromRgiriH:sha1-implimentation

Conversation

RgiriH
Copy link

Description

This pull request adds a advance SHA-1 hashing algorithm implementation. SHA-1 is a widely used cryptographic hash function that generates a 160-bit hash value from input data.

Features

  • Implements the SHA-1 hashing function.
  • Supports string input and returns the hash in hexadecimal format.
  • Includes unit tests to verify correctness.
  • verified the correctness of the algorithm by comparing the results with the sha1 algorithm available in Go and Java

Usage

You can use the SHA-1 function in my code as follows:

import{sha1}from'path/to/sha1';consthashValue=sha1.hash('your input data here');console.log(hashValue);// Outputs the SHA-1 hashconstisSame=sha1.compare('your input data here','you previous hash value here')console.log(isSame);// Outputs true if hash value is the same hash value of input data else false

About the contribution guidelines

  • I have made sure to run test and lint to verify correctness and quality of the code
  • My testing covers all the 100% of my code
  • I have added the README file with reference for further details

@RgiriH
Copy link
Author

  • My folder named "sha1" is available in the cryptography folder

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@andrzejsydorandrzejsydorandrzejsydor approved these changes

@girishhr-bm-aigirishhr-bm-aigirishhr-bm-ai approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@RgiriH@andrzejsydor@girishhr-bm-ai

[8]ページ先頭

©2009-2025 Movatter.jp