Skip to content

trgchinhh/hashlib-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

hashlib-cpp

Giới thiệu

  • Hashlib C++ là thư viện tự build dựa trên thư openssl của trình biên dịch mingw64 c++
  • Với cú pháp ngắn gọn y như hashlib python giúp hash 1 cách nhanh chóng

Ví dụ:

#include <iostream>
#include <hashlib.h>

using namespace std;
using namespace hashlib;

int main(){
    cout << "[?] Enter your data: ";
    string data; cin >> data;
    string hash_data = sha256(data).hexdigest();
    cout << "[-] Your hash: " << hash_data << endl;
    return 0;
}

Kèm lệnh dịch

g++ main.cpp -o main.exe -lssl -lcrypto

Chạy

main.exe

Kết quả của file test_hashlib.cpp

image

Cách dùng

  • Đưa file hashlib.h vào đường dẫn sau
msys64\mingw64\include\c++\14.1.0\hashlib.h

About

The library is built from OpenSSL to achieve syntax minification similar to Python's hashlib

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages