MCPcopy
hub / github.com/grpc/grpc-go / Open

Method Open

credentials/alts/internal/conn/aeadrekey.go:80–86  ·  view source on GitHub ↗

Open rekeys if nonce[2:8] is different than in the last call, masks the nonce, and calls Open for aes128gcm.

(dst, nonce, ciphertext, additionalData []byte)

Source from the content-addressed store, hash-verified

78// Open rekeys if nonce[2:8] is different than in the last call, masks the nonce,
79// and calls Open for aes128gcm.
80func (s *rekeyAEAD) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
81 if err := s.rekeyIfRequired(nonce); err != nil {
82 return nil, err
83 }
84 maskNonce(s.nonceBuf, nonce, s.nonceMask)
85 return s.gcmAEAD.Open(dst, s.nonceBuf, ciphertext, additionalData)
86}
87
88// rekeyIfRequired creates a new aes128gcm AEAD if the existing AEAD is nil
89// or cannot be used with given nonce.

Callers 10

DecryptMethod · 0.80
DecryptMethod · 0.80
scanCRLDirectoryMethod · 0.80
copyFilesFunction · 0.80
NewPayloadCurveFunction · 0.80
createMapFunction · 0.80
formatBenchmarkFunction · 0.80
loadSnapshotFunction · 0.80
loadX509CertFunction · 0.80

Calls 2

rekeyIfRequiredMethod · 0.95
maskNonceFunction · 0.85

Tested by 3

copyFilesFunction · 0.64
loadX509CertFunction · 0.64