safe_browsing/db: migrate to crypto/hash APIs

MERGED2026crypto
2026. 7. 31.minsubb13 프로필 이미지minsubb13

components/safe_browsing/core/browser/db 디렉토리에 crypto/sha2.h 헤더를 crypto/hash.h로 migration.

문제 설명

//crypto 모듈은 sha2.h를 제거하고 hash.h로 migration하는 작업을 진행 중

해결 내용

components/safe_browsing/core/browser/db 디렉토리에 sha2.h를 include 하고 있는 파일을 검색해서
hash.h로 교체

- FullHashStr bad_full_hash(crypto::SHA256HashString(url_bad_no_scheme));
+ FullHashStr bad_full_hash(std::string(
+     base::as_string_view(crypto::hash::Sha256(url_bad_no_scheme))));

테스트 방법

CQ dry run 통과

배운 점

migration 범위를 잡는 연습을 할 수 있었다.

참고 자료

crbug: https://crbug.com/372283556