Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
/*
* Copyright 2017 Kopano
*
* Use of this source code is governed by a MIT license
* that can be found in the LICENSE.txt file.
*
*/
package rndm
import (
"encoding/base64"
)
// GenerateRandomString returns a URL-safe, base64 encoded securely generated
// random string. It will panic if the system fails to provide secure random
// data.
func GenerateRandomString(s int) string {
b := GenerateRandomBytes(s)
return base64.RawURLEncoding.EncodeToString(b)
}