MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / ssPassword

Function ssPassword

internal/serverapi/users.go:841–851  ·  view source on GitHub ↗
(method string)

Source from the content-addressed store, hash-verified

839}
840
841func ssPassword(method string) string {
842 size := 32
843 if method == "2022-blake3-aes-128-gcm" {
844 size = 16
845 }
846 b := make([]byte, size)
847 if _, err := rand.Read(b); err != nil {
848 return ""
849 }
850 return base64.StdEncoding.EncodeToString(b)
851}
852
853// handleResetTraffic 重置用户流量。
854func (a *userAPI) handleResetTraffic(w http.ResponseWriter, r *http.Request, userID string) {

Callers 3

syncUserInboundsMethod · 0.85
handleInboundUsersMethod · 0.85
generateGroupSecretFunction · 0.85

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected