From 013296b8e4ac9d2dc8742179aa0b15398d984751 Mon Sep 17 00:00:00 2001 From: Piotr Dyraga Date: Thu, 24 May 2018 19:15:48 +0200 Subject: [PATCH] Removed PrivateKey's String() method It's better to have no code encouraging to turn key into a string and printing it somewhere, especially that string contains private key Lambda parameter. --- paillier.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/paillier.go b/paillier.go index 74dbd8d..fc501e5 100644 --- a/paillier.go +++ b/paillier.go @@ -55,12 +55,6 @@ type PrivateKey struct { Lambda *big.Int } -func (this *PrivateKey) String() string { - ret := fmt.Sprintf("n : %x", this.N) - ret += fmt.Sprintf("lambda: %x", this.Lambda) - return ret -} - // Decodes ciphertext into a plaintext message. // // c - cyphertext to decrypt