Skip to content

Commit

Permalink
renamed NewEncryptorWithPRNG
Browse files Browse the repository at this point in the history
  • Loading branch information
lehugueni committed Oct 16, 2024
1 parent 451df99 commit 698dd7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/rlwe/encryptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ func newEncryptor(params Parameters) *Encryptor {
}
}

// NewEncryptorWithPRNG creates a new [Encryptor] that uses the provided prng for randomness.
// NewTestEncryptorWithPRNG creates a new [Encryptor] that uses the provided prng for randomness.
// CAUTION: THIS FUNCTION SHOULD BE USED FOR TESTING PURPOSES ONLY.
func NewEncryptorWithPRNG(params ParameterProvider, key EncryptionKey, prng sampling.PRNG) *Encryptor {
func NewTestEncryptorWithPRNG(params ParameterProvider, key EncryptionKey, prng sampling.PRNG) *Encryptor {
p := *params.GetRLWEParameters()

enc := NewEncryptor(params, key)
Expand Down
4 changes: 2 additions & 2 deletions core/rlwe/rlwe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func NewDeterministicTestContext(params Parameters, seedKeyGen, seedEnc []byte)
panic(fmt.Errorf("NewDeterministicTestContext: failed to make prngEnc %w", err))
}
kgen := NewKeyGenerator(params)
kgenEncryptor := NewEncryptorWithPRNG(params, nil, prngKGen)
kgenEncryptor := NewTestEncryptorWithPRNG(params, nil, prngKGen)
kgen.Encryptor = kgenEncryptor

sk := kgen.GenSecretKeyNew()
Expand All @@ -321,7 +321,7 @@ func NewDeterministicTestContext(params Parameters, seedKeyGen, seedEnc []byte)

eval := NewEvaluator(params, nil)

enc := NewEncryptorWithPRNG(params, sk, prngEnc)
enc := NewTestEncryptorWithPRNG(params, sk, prngEnc)

dec := NewDecryptor(params, sk)

Expand Down

0 comments on commit 698dd7b

Please sign in to comment.