ObjectID to shortID (base64) and shortID to ObjectID
|
2 years ago | |
---|---|---|
README.md | 2 years ago | |
go.mod | 2 years ago | |
oid64.go | 2 years ago | |
oid64_test.go | 2 years ago |
oid64 converts from bson ObjectID string to URLencoded base64 string and back.
ObjectIDs are string representations of hexadecimal values. This package converts the hexadecimal strings to binary values and then converts the binary values to base64.
Likewise base64 values are converted to binary values and back to their hexadecimal string representation.
GPL 2