console
console copied to clipboard
OCPBUGS-44505: remove crypto-browserify library and use Crypto instead
This PR replaces the use of crypto-browserify for generating a hash for a given username with the native Crypto object and its subtle.digest method, which is supported in all browsers compatible with v4.21. This way we not only remove unnecessary dependencies, but also use browser-optimized native cryptographic functionality.
Changes in this PR:
- Replaced
crypto-browserify's createHash function with a newly implementedgenerateHashfunction that utilizes browser-nativeCrypto.subtle.digest. - Removed crypto-browserify from the dependencies as this was its sole usage in the codebase.