MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / decrypt

Function decrypt

x/log_writer.go:186–195  ·  view source on GitHub ↗

used to verify client has correct key and can decrypt audit log header

(key, iv, src []byte)

Source from the content-addressed store, hash-verified

184
185// used to verify client has correct key and can decrypt audit log header
186func decrypt(key, iv, src []byte) ([]byte, error) {
187 ivCopy := make([]byte, 16)
188 copy(ivCopy, iv[:]) // todo: do we need to copy here?
189
190 plainText, err := y.XORBlockAllocate(src, key, ivCopy)
191 if err != nil {
192 return nil, err
193 }
194 return plainText, nil
195}
196
197func (l *LogWriter) rotate() error {
198 if l == nil {

Callers 1

openMethod · 0.70

Calls 1

copyFunction · 0.85

Tested by

no test coverage detected