https://github.com/ihateblueb/aidx4j
Library for generating IDs in the AID or AIDX format in Java
https://github.com/ihateblueb/aidx4j
aid aidx id java misskey
Last synced: 5 days ago
JSON representation
Library for generating IDs in the AID or AIDX format in Java
- Host: GitHub
- URL: https://github.com/ihateblueb/aidx4j
- Owner: ihateblueb
- License: lgpl-3.0
- Created: 2026-01-08T01:44:30.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-08T01:57:20.000Z (5 months ago)
- Last Synced: 2026-06-10T05:28:32.583Z (9 days ago)
- Topics: aid, aidx, id, java, misskey
- Language: Java
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aidx4j
Library for generating IDs in the AID or AIDX format in Java.
AID is deprecated since it is no longer default in Misskey and is likely to collide, whereas AIDX is not. It's only
included for compatability purposes.
AID is composed of two components: the current time minus time since 2000 (8 chars), then an ending from a global
counter (2 chars).
An example AID would be `ah8ccctf0j`.
AIDX is composed of three components: the current time minus time since 2000 (8 chars), random lowercase letters or
numbers (4 chars), then an ending from a global counter (4 chars).
An example AIDX would be `ah8ccyxnft8p002p`.
## Examples
```java
// In Java
public static void main() {
System.out.println("Generated AIDX " + generateAidx());
}
```
```kotlin
// In Kotlin
fun main() {
println("Generated AIDX ${generateAidx()}")
}
```
## Installing
aidx4j is available in the remlit.site repository. You can install it like below.
```kotlin
repositories {
maven("https://repo.remlit.site/releases")
}
dependencies {
implementation("site.remlit:aidx4j:1.0.0")
}
```