MariaDB yükseltmesi | Giriş Hatası Şifre Yanlış

Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

MaskesizVEVO

Üye
Üye
Mesaj
313
Çözümler
6
Beğeni
22
Puan
459
Ticaret Puanı
0
burası doğru sanırım komple tüm sourceyi derledim fakat yine aynı yardımcı olabilir misiniz giriş yaparken şifre yanlış diyor
C++:
Genişlet Daralt Kopyala
#include <iostream>
#include <string>
#include <iomanip>
#include <cryptopp/cryptlib.h>
#include <cryptopp/filters.h>
#include <cryptopp/hex.h>
#include <cryptopp/sha.h>

std::string mysql5_password(const std::string& input)
{
    CryptoPP::SHA1 sha1;
    CryptoPP::byte digest1[CryptoPP::SHA1::DIGESTSIZE];

    // First SHA1 hash
    sha1.Update(reinterpret_cast<const CryptoPP::byte*>(input.c_str()), input.length());
    sha1.Final(digest1);

    // Second SHA1 hash on the hex-encoded digest1
    std::string encoded1(reinterpret_cast<const char*>(digest1), CryptoPP::SHA1::DIGESTSIZE);
    std::string encoded2;

    CryptoPP::StringSource(encoded1, true,
        new CryptoPP::HashFilter(sha1,
            new CryptoPP::HexEncoder(
                new CryptoPP::StringSink(encoded2)
            )
        )
    );

    // Uppercase and prepend '*'
    std::string password = "*" + encoded2;
    for (char& c : password) {
        c = std::toupper(c);
    }

    return password;
}

std::string mysql_hash_password(const char* tmp_pwd)
{
    return mysql5_password(tmp_pwd);
}
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst