nodejs / nodejs/node

Allow Hash object reuse

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

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

crypto feature request never-stale
Ngôn ngữ chính
JavaScript
Star
122k
Fork
37.4k
Merge trung bình
4 ngày 3 giờ
Pull request đã merge (30 ngày)
272

Mô tả

What is the problem this feature will solve?

https://github.com/nodejs/node/issues/25857#issuecomment-466384613

I'm creating the hash of many small objects and need to keep track of these individual hashes so https://github.com/nodejs/node/issues/29903 doesn't work.

My specific use case is that I'm hashing directory layouts to setup a file layout that's optimal about symlinking entire directories when its filled with symlinked entries that all point to the same source directory. I can get into specifics if that matters.

What is the feature you are proposing to solve the problem?

crypto.Hash.reset() - reset the internal state of the hasher and allows it to be reused with any new allocations

What alternatives have you considered?

-not use crypto.hash in this case and write my own hasher
-create a native add on that lets me manage to hash context according to my needs

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Issue không xác định tệp triển khai hoặc bài kiểm thử nào. Hãy bắt đầu bằng cách đọc hai cuộc thảo luận Node.js được liên kết và ngữ cảnh hiện có của crypto.Hash API; công việc được xem là hoàn tất khi một thao tác reset cho phép tái sử dụng một đối tượng Hash cho các lần cấp phát mới, đồng thời vẫn giữ riêng biệt các kết quả băm.

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

Đánh giá

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

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.