2021-07-15 05:56:37 +00:00
|
|
|
// DEPRECATED: this has been moved to go-secure-stdlib and will be removed
|
2019-04-15 15:36:10 +00:00
|
|
|
package base62
|
|
|
|
|
|
|
|
import (
|
2019-10-17 17:33:00 +00:00
|
|
|
"io"
|
2019-11-07 16:54:34 +00:00
|
|
|
|
2021-07-15 05:56:37 +00:00
|
|
|
extbase62 "github.com/hashicorp/go-secure-stdlib/base62"
|
2019-04-15 15:36:10 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func Random(length int) (string, error) {
|
2021-07-15 05:56:37 +00:00
|
|
|
return extbase62.Random(length)
|
2019-10-17 17:33:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func RandomWithReader(length int, reader io.Reader) (string, error) {
|
2021-07-15 05:56:37 +00:00
|
|
|
return extbase62.RandomWithReader(length, reader)
|
2019-04-15 15:36:10 +00:00
|
|
|
}
|