Debugging

This commit is contained in:
2022-03-13 07:06:39 +13:00
parent 8bc3cee328
commit dc8de8b4b9
31 changed files with 952 additions and 1040 deletions

View File

@@ -1,20 +1,20 @@
package rand
// package rand
import (
"crypto/rand"
// import (
// "crypto/rand"
"git.1248.nz/1248/Otfe/misc/b64"
)
// "git.technical.kiwi/go/otfe/misc/b64"
// )
//Bytes generates an random set of bytes n long
func Bytes(n int) ([]byte, error) {
b := make([]byte, n)
_, err := rand.Read(b)
return b, err
}
// //Bytes generates an random set of bytes n long
// func Bytes(n int) ([]byte, error) {
// b := make([]byte, n)
// _, err := rand.Read(b)
// return b, err
// }
//B64String generates a base 64 string n bytess long
func B64String(n int) (string, error) {
b, err := Bytes(n)
return b64.Encode(string(b)), err
}
// //B64String generates a base 64 string n bytess long
// func B64String(n int) (string, error) {
// b, err := Bytes(n)
// return b64.Encode(string(b)), err
// }