aboutsummaryrefslogtreecommitdiff
path: root/azalea-crypto/src/offline.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-12-15 14:59:26 +0700
committermat <git@matdoes.dev>2025-12-15 14:59:26 +0700
commit0569ffd2d85585eb69de9068ab3f62e768bce4e7 (patch)
treee20d7faf8df7ede4eb3f52d3223b27782a964be0 /azalea-crypto/src/offline.rs
parent232f1a434406d77dc5ef1d19edcdf006e32491e8 (diff)
downloadazalea-drasl-0569ffd2d85585eb69de9068ab3f62e768bce4e7.tar.xz
write/update docs for several items
Diffstat (limited to 'azalea-crypto/src/offline.rs')
-rw-r--r--azalea-crypto/src/offline.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/azalea-crypto/src/offline.rs b/azalea-crypto/src/offline.rs
index 737555e8..b0e7c12b 100644
--- a/azalea-crypto/src/offline.rs
+++ b/azalea-crypto/src/offline.rs
@@ -1,6 +1,9 @@
+//! Offline-mode UUID generation.
+
use md5::{Digest, Md5};
use uuid::Uuid;
+/// Return what the offline-mode UUIDv3 for the given username would be.
pub fn generate_uuid(username: &str) -> Uuid {
uuid::Builder::from_md5_bytes(hash(format!("OfflinePlayer:{username}").as_bytes())).into_uuid()
}