MCPcopy
hub / github.com/kopia/kopia / CreateAlgorithm

Function CreateAlgorithm

repo/ecc/ecc.go:38–46  ·  view source on GitHub ↗

CreateAlgorithm returns new encryption.Encryptor with error correction.

(opts *Options)

Source from the content-addressed store, hash-verified

36
37// CreateAlgorithm returns new encryption.Encryptor with error correction.
38func CreateAlgorithm(opts *Options) (encryption.Encryptor, error) {
39 factory, exists := factories[opts.Algorithm]
40
41 if !exists {
42 return nil, errors.New("Unknown ECC algorithm: " + opts.Algorithm)
43 }
44
45 return factory(opts)
46}
47
48// Parameters encapsulates all ECC parameters.
49type Parameters interface {

Callers 3

runBenchmarkMethod · 0.92
CreateEncryptorFunction · 0.85
testPutAndGetFunction · 0.85

Calls

no outgoing calls

Tested by 1

testPutAndGetFunction · 0.68