Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Enforce input limits for Hashes

Đang mở
#165 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
cryptography

Hướng nghiên cứu

Start by reading core::traits::Hash and the supported hash implementations in src/*.rs; look up each algorithm’s specified input limit. Check whether the one-shot and do_final() APIs can report limit errors, and whether do_update() needs the same pathway. Done means boundary tests show input below the limit succeeds and input exceeding it returns an error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

All hash functions (SHA2, SHA3, SM3, etc) have a specified input limit beyond which output can start repeating. Currently our core::traits::Hash trait does not have any way to return errors.

Task

  • Look up the specified input limits for each supported hash function.
  • Add an error pathway to at least the one-shot, do_final() APIs, and maybe also the do_update() APIs in core::traits::Hash.
  • Add unit tests (inside the src/*.rs file) that absorb some input, reach inside and set the counter to very close to the limit, absorb more input that does not exceed the limit (should pass), then absorb input that does exceed the limit (should throw error).
Ngôn ngữ chính
Rust
Star
25
Fork
18
Merge trung bình
14 ngày 10 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bcgit/bc-rust

Tất cả issue của bcgit/bc-rust

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.