Scala 3 implementation of secure, collision-resistant id optimized for horizontal scaling and performance, see paralleldrive/cuid2.
Provided CUID2 is an opaque String type.
Example CUID2 identifiers:
c33ac9tfcucg9lwy4g3m97k4
rdlsk2bhemwsc67g9ayzvhh4
ojztefl2tsw4udm6qim84m6j
g0fms5rw2qp8ek6fgdgx7rvl
l1k2h6thfsvfpjyk02ckucft
k63khcsncj0u66ptyc62960o
yqvijw75d09zl2uinfl4x8l0
rvrl63ma653vlcdurno3rysf
s0epojrhqtlir6y6gvjc5lo9
ts1vmmdjuoq1na62gyk7mzv0
i8nqsaalfhzujnfqswzc4tnm
ceaxu90rkefyfzsda9oh5rrt
w2iyrimplmhm1bec5vypkwbl
- Scala >= 3.3.5
- org.encalmo opaque-type 0.9.1
Use with SBT
libraryDependencies += "org.encalmo" %% "cuid2" % "0.9.1"
or with SCALA-CLI
//> using dep org.encalmo::cuid2:0.9.1
import org.encalmo.models.CUID2
val cuid: CUID2 = CUID2.randomCUID2()
├── .github
│ └── workflows
│ ├── pages.yaml
│ ├── release.yaml
│ └── test.yaml
│
├── .gitignore
├── .scalafmt.conf
├── CUID2.scala
├── CUID2.test.scala
├── LICENSE
├── project.scala
├── README.md
└── test.sh