console icon indicating copy to clipboard operation
console copied to clipboard

OCPBUGS-44505: remove crypto-browserify library and use Crypto instead

Open Mylanos opened this issue 1 year ago • 68 comments

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 implemented generateHash function that utilizes browser-native Crypto.subtle.digest.
  • Removed crypto-browserify from the dependencies as this was its sole usage in the codebase.

Mylanos avatar Nov 18 '24 15:11 Mylanos