chore: change checksum algo

This commit is contained in:
Kujtim Hoxha
2025-07-23 14:55:34 +02:00
parent 2a13723ac3
commit ce47eb0fca

View File

@@ -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))