Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Hàm băm khoá tài nguyên là một cơ chế cho phép Google xác minh tính toàn vẹn của
khoá mã hoá được bao bọc mà không có quyền truy cập vào khoá.
Để tạo hàm băm khoá tài nguyên, bạn cần có quyền truy cập vào khoá đã khám phá, bao gồm
DEK, resource_name và perimeter_id được chỉ định trong khoá
thao tác xuống dòng.
Chúng ta sử dụng hàm mã hoá HMAC-SHA256 với unwrapped_dek làm khoá và
việc nối siêu dữ liệu thành dữ liệu
("ResourceKeyDigest:", resource_name, ":", perimeter_id)resource_name và perimeter_id phải là chuỗi được mã hoá UTF-8.
Ví dụ: khi resource_name = "my_resource",
perimeter_id = "my_perimeter" và unwrapped_dek = 0xf00d, khoá tài nguyên
hàm băm là:
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-08-22 UTC."],[[["The resource key hash ensures Google can verify the integrity of wrapped encryption keys without needing access to the actual keys."],["Generating the hash requires the unwrapped key, resource name, and perimeter ID used during key wrapping."],["It utilizes HMAC-SHA256, using the unwrapped key as the key and a concatenation of resource details as data for the hash calculation."],["The resource name and perimeter ID need to be UTF-8 encoded strings for the hash generation."]]],["The core mechanism is generating a resource key hash to verify wrapped encryption key integrity. This involves using HMAC-SHA256 with the unwrapped DEK as the key and a specific concatenation of metadata as data. The metadata consists of \"ResourceKeyDigest:\", the UTF-8 encoded `resource_name`, \":\", and the UTF-8 encoded `perimeter_id`. An example shows generating the hash using `openssl` with a sample `resource_name`, `perimeter_id`, and `unwrapped_dek`.\n"]]