- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for BitrotAlgorithmFromString (0.18 sec)
-
cmd/bitrot.go
type BitrotVerifier struct { algorithm BitrotAlgorithm sum []byte } // BitrotAlgorithmFromString returns a bitrot algorithm from the given string representation. // It returns 0 if the string representation does not match any supported algorithm. // The zero value of a bitrot algorithm is never supported. func BitrotAlgorithmFromString(s string) (a BitrotAlgorithm) { for alg, name := range bitrotAlgorithms { if name == s {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.6K bytes - Viewed (0) -
cmd/xl-storage-format-v1.go
if err := json.Unmarshal(data, &info); err != nil { return err } sum, err := hex.DecodeString(info.Hash) if err != nil { return err } c.Algorithm = BitrotAlgorithmFromString(info.Algorithm) c.Hash = sum if _, err = fmt.Sscanf(info.Name, "part.%d", &c.PartNumber); err != nil { return err } if !c.Algorithm.Available() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 8.4K bytes - Viewed (0) -
cmd/storage-rest-server.go
hashStr := r.Form.Get(storageRESTBitrotHash) var hash []byte hash, err = hex.DecodeString(hashStr) if err != nil { s.writeErrorResponse(w, err) return } verifier = NewBitrotVerifier(BitrotAlgorithmFromString(r.Form.Get(storageRESTBitrotAlgo)), hash) } buf := make([]byte, length) defer metaDataPoolPut(buf) // Reuse if we can. _, err = s.getStorage().ReadFile(r.Context(), volume, filePath, int64(offset), buf, verifier)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 45.7K bytes - Viewed (0)