docs: add godoc comments to all exported functions and methods

This commit is contained in:
adman
2026-07-30 00:20:55 +02:00
parent 56c97a2b3f
commit 0d6b6e1ab9
50 changed files with 186 additions and 408 deletions
+2
View File
@@ -41,10 +41,12 @@ type CFB8 struct {
mutex sync.Mutex
}
// NewCFB8Decrypt creates a new CFB8 stream cipher in decrypt mode.
func NewCFB8Decrypt(c cipher.Block, iv []byte) *CFB8 {
return newCFB8(c, iv, true)
}
// NewCFB8Encrypt creates a new CFB8 stream cipher in encrypt mode.
func NewCFB8Encrypt(c cipher.Block, iv []byte) *CFB8 {
return newCFB8(c, iv, false)
}
+1
View File
@@ -21,6 +21,7 @@ func uuidV3(space []byte, data []byte) uuid.UUID {
return u
}
// FromOfflinePlayer generates a UUID for an offline-mode (cracked) player from their display name.
func FromOfflinePlayer(displayName string) uuid.UUID {
return uuidV3([]byte("OfflinePlayer:"), []byte(displayName))
}