mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
chore: change checksum algo
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
package anim
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"image/color"
|
||||
"math/rand/v2"
|
||||
@@ -11,6 +10,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/zeebo/xxh3"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea/v2"
|
||||
"github.com/charmbracelet/lipgloss/v2"
|
||||
"github.com/lucasb-eyer/go-colorful"
|
||||
@@ -78,7 +79,7 @@ var (
|
||||
|
||||
// settingsHash creates a hash key for the settings to use for caching
|
||||
func settingsHash(opts Settings) string {
|
||||
h := sha256.New()
|
||||
h := xxh3.New()
|
||||
fmt.Fprintf(h, "%d-%s-%v-%v-%v-%t",
|
||||
opts.Size, opts.Label, opts.LabelColor, opts.GradColorA, opts.GradColorB, opts.CycleColors)
|
||||
return fmt.Sprintf("%x", h.Sum(nil))
|
||||
|
||||
Reference in New Issue
Block a user