-
-
Notifications
You must be signed in to change notification settings - Fork 0
merge #112
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
Merged
Merged
merge #112
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nterface - Remove unused algorithms: SHA1, SHA256, dummy - Add Type() method to Cryptographic interface - Implement Type() method for all existing algorithms - Update crypto struct to use algorithm type as key
- Add default cost parameter and salt - Include ScryptConfig with default N, R, and P values - Update comments to reflect new default settings
- Replace generic error messages with specific error types for algorithm mismatch and password not match - Add support for SHA-1 and SHA-256 hashing algorithms - Implement constant-time comparison for SHA-256 to enhance security - Update existing algorithms (Argon2, Bcrypt, HMAC256, MD5) to use specific error types
- Add support for SHA-512 hashing - Update SHA-1 and SHA-256 implementations - Remove dummy crypto implementation - Update cached crypto to use type from wrapped crypto
- Deleted the entire sha1 and sha256 algorithm implementations - Removed associated files and imports
- Implement PBKDF2 hashing algorithm in the crypto toolkit - Add new configuration options for PBKDF2: iterations and hash type - Update crypto factory to support PBKDF2 - Include PBKDF2 in the list of available hashing algorithms
- Add core/hash package to support custom hash functions - Implement hash.Hash interface for various algorithms including MD4, MD5, SHA1, SHA256, etc. - Provide registration mechanism for custom hash functions - Include test cases for supported hash algorithms
…unctionality - Add RegisterOrUpdateHashFunc to register or update hash functions - Implement IsCustomHash function to check if a hash is custom - Update test cases to include custom hash functions and edge cases - Improve error handling and test coverage for hash parsing and custom hash scenarios
- Add ParamConfig interface and implement for each hash algorithm - Update Config struct to use ParamConfig instead of individual fields - Modify validation and creation logic to use new param config - Update examples and tests to use new param config format
- Remove direct usage of crypto/sha packages - Use core.Hash interface instead of hash.Hash - Implement hash algorithm initialization using core.ParseHash - Make hash algorithm name case-insensitive - Update hash core to support lowercase algorithm names
- Replace simple equality check with constant-time comparison for password hashes - Use crypto/subtle package to prevent timing attacks - Affected algorithms: hmac256, pbkdf2, sha
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.