| 26 | namespace snap::drawing { |
| 27 | |
| 28 | static Result<Valdi::Path> keyToFileName(const BytesView& key) { |
| 29 | if (key.data() == nullptr || key.empty()) { |
| 30 | return Error("Invalid key data object"); |
| 31 | } |
| 32 | |
| 33 | auto strHash = BytesUtils::sha256String(key); |
| 34 | return Valdi::Path(strHash); |
| 35 | } |
| 36 | |
| 37 | static Result<Valdi::BytesView> skDataToByteView(const SkData& data) { |
| 38 | if (data.data() == nullptr || data.isEmpty()) { |
no test coverage detected