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
| const crypto = require('crypto'); | |
| const secretKey = [secret_key] | |
| // Generate a 32-byte encryption key using SHA-256 hash of the provided key | |
| const key = crypto | |
| .createHash('sha256') | |
| .update(secretKey) | |
| .digest(); // 32 bytes required for AES-256 | |
| const encryptionMethod = 'aes-256-cbc' // AES encryption with 256-bit key and CBC mode |
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
| window.onload = function() { | |
| loadUiAvatar(); | |
| }; | |
| function loadUiAvatar() { | |
| if($('img.gf-avatar').length > 0) { | |
| $('img.gf-avatar').each(function() { | |
| const srcAttr = $(this).attr('src'); | |
| if(typeof srcAttr === 'undefined') { |