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

Method Encrypt

credentials/alts/internal/conn/record.go:40–40  ·  view source on GitHub ↗

Encrypt encrypts the plaintext, computes the tag (if any) of dst and plaintext, and appends the result to dst, returning the updated slice. dst and plaintext may fully overlap or not at all.

(dst, plaintext []byte)

Source from the content-addressed store, hash-verified

38 // plaintext, and appends the result to dst, returning the updated slice.
39 // dst and plaintext may fully overlap or not at all.
40 Encrypt(dst, plaintext []byte) ([]byte, error)
41 // EncryptionOverhead returns the tag size (if any) in bytes.
42 EncryptionOverhead() int
43 // Decrypt decrypts ciphertext and verifies the tag (if any). If successful,

Callers 6

WriteMethod · 0.65
testFrameTooLargeFunction · 0.65
testProtectedBufferFunction · 0.65
testGCMEncryptRoundtripFunction · 0.65

Implementers 2

aes128gcmRekeycredentials/alts/internal/conn/aes128g
aes128gcmcredentials/alts/internal/conn/aes128g

Calls

no outgoing calls

Tested by 5

testFrameTooLargeFunction · 0.52
testProtectedBufferFunction · 0.52
testGCMEncryptRoundtripFunction · 0.52