From 8b01148624504b062559735e5ea318dd2531fd39 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 8 Mar 2023 19:23:13 +0700 Subject: Fix some warnings --- crypto/src/openpgp/PgpPublicKey.cs | 30 +++++++++++----------- crypto/src/openpgp/PgpPublicKeyRing.cs | 4 +-- .../src/pqc/crypto/hqc/HqcKeccakRandomGenerator.cs | 2 -- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/crypto/src/openpgp/PgpPublicKey.cs b/crypto/src/openpgp/PgpPublicKey.cs index b4ae92838..3ebfc6256 100644 --- a/crypto/src/openpgp/PgpPublicKey.cs +++ b/crypto/src/openpgp/PgpPublicKey.cs @@ -1145,21 +1145,21 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp return found ? returnKey : null; } - /** - * Merge this the given local public key with another, potentially fresher copy. - * The resulting {@link PGPPublicKey} contains the sum of both keys user-ids and signatures. - *

- * If joinTrustPackets is set to true and the copy carries a trust packet, - * the joined key will copy the trust-packet from the copy. - * Otherwise, it will carry the trust packet of the local key. - * - * @param key local public key - * @param copy copy of the public key (e.g. from a key server) - * @param joinTrustPackets if true, trust packets from the copy are copied over into the resulting key - * @param allowSubkeySigsOnNonSubkey if true, subkey signatures on the copy will be present in the merged key, even if key was not a subkey before. - * @return joined key - * @throws PGPException - */ + ///

+ /// Merge the given local public key with another, potentially fresher copy. The resulting public key + /// contains the sum of both keys' user-ids and signatures. + /// + /// + /// If joinTrustPackets is set to true and the copy carries a trust packet, the joined key will copy the + /// trust-packet from the copy. Otherwise, it will carry the trust packet of the local key. + /// + /// local public key. + /// copy of the public key (e.g. from a key server). + /// if true, trust packets from the copy are copied over into the resulting key. + /// + /// if true, subkey signatures on the copy will be present in the + /// merged key, even if key was not a subkey before. + /// joined key. public static PgpPublicKey Join(PgpPublicKey key, PgpPublicKey copy, bool joinTrustPackets, bool allowSubkeySigsOnNonSubkey) { diff --git a/crypto/src/openpgp/PgpPublicKeyRing.cs b/crypto/src/openpgp/PgpPublicKeyRing.cs index 34b9e34d1..46eecd726 100644 --- a/crypto/src/openpgp/PgpPublicKeyRing.cs +++ b/crypto/src/openpgp/PgpPublicKeyRing.cs @@ -206,7 +206,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp * Join two copies of the same certificate. * The certificates must have the same primary key, but may carry different subkeys, user-ids and signatures. * The resulting certificate will carry the sum of both certificates subkeys, user-ids and signatures. - *

+ *
* This method will ignore trust packets on the second copy of the certificate and instead * copy the local certificate's trust packets to the joined certificate. * @@ -224,7 +224,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp * Join two copies of the same certificate. * The certificates must have the same primary key, but may carry different subkeys, user-ids and signatures. * The resulting certificate will carry the sum of both certificates subkeys, user-ids and signatures. - *

+ *
* For each subkey holds: If joinTrustPackets is set to true and the second key is carrying a trust packet, * the trust packet will be copied to the joined key. * Otherwise, the joined key will carry the trust packet of the local copy. diff --git a/crypto/src/pqc/crypto/hqc/HqcKeccakRandomGenerator.cs b/crypto/src/pqc/crypto/hqc/HqcKeccakRandomGenerator.cs index 07d933247..e744bb9b1 100644 --- a/crypto/src/pqc/crypto/hqc/HqcKeccakRandomGenerator.cs +++ b/crypto/src/pqc/crypto/hqc/HqcKeccakRandomGenerator.cs @@ -20,7 +20,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.Hqc private readonly ulong[] state = new ulong[26]; private readonly byte[] dataQueue = new byte[192]; private int rate; - private int bitsInQueue; private int fixedOutputLength; public HqcKeccakRandomGenerator() @@ -58,7 +57,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.Hqc this.rate = rate; Arrays.Fill(state, 0UL); Arrays.Fill(dataQueue, 0); - bitsInQueue = 0; fixedOutputLength = (1600 - rate) / 2; } -- cgit 1.4.1