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

Method Decrypt

credentials/alts/internal/conn/aes128gcm.go:93–105  ·  view source on GitHub ↗
(dst, ciphertext []byte)

Source from the content-addressed store, hash-verified

91}
92
93func (s *aes128gcm) Decrypt(dst, ciphertext []byte) ([]byte, error) {
94 seq, err := s.inCounter.Value()
95 if err != nil {
96 return nil, err
97 }
98 // If dst is equal to ciphertext[:0], ciphertext storage is reused.
99 plaintext, err := s.aead.Open(dst, seq, ciphertext, nil)
100 if err != nil {
101 return nil, ErrAuth
102 }
103 s.inCounter.Inc()
104 return plaintext, nil
105}

Callers

nothing calls this directly

Calls 3

OpenMethod · 0.80
IncMethod · 0.80
ValueMethod · 0.45

Tested by

no test coverage detected