MCPcopy
hub / github.com/kopia/kopia / Encryptor

Interface Encryptor

repo/encryption/encryption.go:21–33  ·  view source on GitHub ↗

Encryptor performs encryption and decryption of contents of data.

Source from the content-addressed store, hash-verified

19
20// Encryptor performs encryption and decryption of contents of data.
21type Encryptor interface {
22 // Encrypt appends the encrypted bytes corresponding to the given plaintext to a given slice.
23 // Must not clobber the input slice and return ciphertext with additional padding and checksum.
24 Encrypt(plainText gather.Bytes, contentID []byte, output *gather.WriteBuffer) error
25
26 // Decrypt appends the unencrypted bytes corresponding to the given ciphertext to a given slice.
27 // Must not clobber the input slice. If IsAuthenticated() == true, Decrypt will perform
28 // authenticity check before decrypting.
29 Decrypt(cipherText gather.Bytes, contentID []byte, output *gather.WriteBuffer) error
30
31 // Overhead is the number of bytes of overhead added by Encrypt()
32 Overhead() int
33}
34
35// Parameters encapsulates all encryption parameters.
36type Parameters interface {

Callers 21

runBenchmarkMethod · 0.65
runBenchmarkMethod · 0.65
runBenchmarkMethod · 0.65
ProtectMethod · 0.65
EncryptFunction · 0.65
testPutAndGetFunction · 0.65
mustPutDummySessionBlobFunction · 0.65
runBenchmarkMethod · 0.65
VerifyMethod · 0.65
DecryptFunction · 0.65
testPutAndGetFunction · 0.65

Implementers 5

badEncryptorinternal/blobcrypto/blob_crypto_test.g
ReedSolomonCrcECCrepo/ecc/ecc_rs_crc.go
aes256GCMHmacSha256repo/encryption/aes256_gcm_hmac_sha256
chacha20poly1305hmacSha256Encryptorrepo/encryption/chacha20_poly1305_hmac
encryptorWrapperrepo/format/encryptor_wrapper.go

Calls

no outgoing calls

Tested by

no test coverage detected