
Now that there's no ambiguity we don't need the span suffix, just as we don't have one in base::HexEncode(). Convert GPU Command Buffer code from using `char*` with a known constant length to be `span<uint8_t, kHashLength>` for compile-time bounds-safety. Convert other uses of SHA1HashBytes() to SHA1Hash() and the use of spans. Add an overload of base::as_byte_span and base::as_writable_byte_span that takes a compile-time size for the output span, and verifies at runtime that it is correct. This allows the caller to skip calling the span ctor or make_span<N> overload in order to move from a variable sized container to a fixed-size byte span. R=davidben@chromium.org, sunnyps@chromium.org Bug: 40284755 Change-Id: I0e6b923303731e846655ee25ec59d78eccc62d00 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5597223 Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Reviewed-by: David Benjamin <davidben@chromium.org> Commit-Queue: danakj <danakj@chromium.org> Owners-Override: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/main@{#1310804}