profweb adlı üyeden alıntı: mesajı görüntüle
Hocam sayıyı kolay kolay bulamazsınız, kodun mantığı o zaten. Brute force deneyebilirsiniz onun için de çok yüksek sayıda işlem gerekiyor ( 100 * 4^100 işlem ) .
Hocam onu deneyemem çünkü ne olduğunu bilmiyorum,

atayım bari 37

bu arada, sizin sayenizde shh256 keyinde hash üretme kodu yazdırdım

const crypto = require('crypto');

function generateRandomKey(length) {
    const characters = 'abcd';
    let key = '';
    for (let i = 0; i < length; i++) {
        const randomIndex = Math.floor(Math.random() * characters.length);
        key += characters[randomIndex];
    }
    return key;
}

const targetHash = 'fa2f1a7c94dd2f8721ed80380460dd8d';
let found = false;
let attempts = 0;

while (!found) {
    const randomNumber = Math.floor(Math.random() * 100) + 1;
    const data = randomNumber.toString();
    const hashBuffer = crypto.createHash('sha256').update(data).digest();
    const hashValue = hashBuffer.toString('hex');
    const randomKey = generateRandomKey(3);

    attempts++;

    if (hashValue === targetHash) {
        found = true;
        console.log(`Input: ${randomNumber}, Hash: ${hashValue}, Key: ${randomKey}`);
        console.log(`Found in ${attempts} attempts.`);
    }
}
En sağlamı sanırım dediğiniz gibi bir işlem gerekecek sadece sha 256 için... biraz daha uğraşsam hacker olacam