alist/server/common/sign.go

14 lines
251 B
Go
Raw Normal View History

2022-06-28 13:58:46 +00:00
package common
import (
"github.com/alist-org/alist/v3/internal/model"
"github.com/alist-org/alist/v3/internal/sign"
)
2022-09-11 06:14:14 +00:00
func Sign(obj model.Obj, encrypt bool) string {
if obj.IsDir() || !encrypt {
2022-06-28 13:58:46 +00:00
return ""
}
return sign.Sign(obj.GetName())
}