MCPcopy Index your code
hub / github.com/coder/coder / initCipher

Function initCipher

enterprise/dbcrypt/dbcrypt_internal_test.go:844–852  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

842}
843
844func initCipher(t *testing.T) *aes256 {
845 t.Helper()
846 key := make([]byte, 32) // AES-256 key size is 32 bytes
847 _, err := io.ReadFull(rand.Reader, key)
848 require.NoError(t, err)
849 c, err := cipherAES256(key)
850 require.NoError(t, err)
851 return c
852}
853
854func setup(t *testing.T) (db database.Store, cryptDB *dbCrypt, cs []Cipher) {
855 t.Helper()

Callers 2

TestNewFunction · 0.85
setupFunction · 0.85

Calls 2

cipherAES256Function · 0.85
HelperMethod · 0.65

Tested by

no test coverage detected