kornrunner/keccak
Pure PHP Keccak (SHA-3) implementation with easy static API. Compute Keccak hashes (224/256/384/512) and SHAKE outputs (XOF) without extensions. Includes test suite and coverage, suitable for Ethereum and other crypto use cases.
Enhanced Cryptographic Security for Laravel Applications:
Enable SHA-3/Keccak-based hashing for sensitive operations where standard PHP hashing (e.g., hash() or OpenSSL) is insufficient or unavailable. Use cases include:
Compliance and Future-Proofing:
Build vs. Buy Decision:
hash() support for SHA-3).paragonie/sodium_compat).Roadmap Prioritization:
Hash facade.Adopt When:
Look Elsewhere If:
hash_algos(), but may not support all Keccak variants.web3.php or ethereumjs-util for higher-level abstractions.*"This package lets us use SHA-3/Keccak hashing—the industry-standard for cryptographic integrity—without adding system dependencies. Here’s why it matters:
Trade-off: A minor performance hit vs. native libraries, but we gain portability and control over our crypto stack. The MIT license means no licensing costs, and the package is lightweight to integrate.
Recommendation: Pilot this for non-critical hashing (e.g., auth salts, blockchain addresses) and benchmark before scaling."*
*"Why Use This Package?
Key Risks:
Proposed Integration:
Keccak::hash($data, 256).// app/Providers/AppServiceProvider.php
Hash::extend('keccak', function() {
return function($value, array $options = []) {
return Keccak::hash($value, $options['rounds'] ?? 256);
};
});
Then use: Hash::driver('keccak')->make($value).Example Use Case:
// Generate Ethereum address hash (Keccak-256)
$addressHash = Keccak::hash($walletData, 256);
Next Steps:
Hash facade).*"Why SHA-3/Keccak?
Risks Mitigated:
Recommendation:
How can I help you explore Laravel packages today?