MCPcopy Index your code
hub / github.com/rilldata/rill / NewRandomKeyring

Function NewRandomKeyring

admin/database/database.go:1290–1302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1288}
1289
1290func NewRandomKeyring() ([]*EncryptionKey, error) {
1291 secret := make([]byte, 32) // 32 bytes for AES-256
1292 _, err := rand.Read(secret)
1293 if err != nil {
1294 return nil, err
1295 }
1296
1297 encKeyRing := []*EncryptionKey{
1298 {ID: uuid.New().String(), Secret: secret},
1299 }
1300
1301 return encKeyRing, nil
1302}
1303
1304const BillingGracePeriodDays = 9
1305

Callers 3

mainFunction · 0.92
TestPostgresFunction · 0.92
NewWithOptionalRuntimeFunction · 0.92

Calls 1

StringMethod · 0.65

Tested by 1

TestPostgresFunction · 0.74