diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-08 19:23:13 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-03-08 19:23:13 +0700 |
commit | 8b01148624504b062559735e5ea318dd2531fd39 (patch) | |
tree | 5d2501f6304799cbf2d98dd56ed081792de1b91b | |
parent | Mark explicitly internal (diff) | |
download | BouncyCastle.NET-ed25519-8b01148624504b062559735e5ea318dd2531fd39.tar.xz |
Fix some warnings
-rw-r--r-- | crypto/src/openpgp/PgpPublicKey.cs | 30 | ||||
-rw-r--r-- | crypto/src/openpgp/PgpPublicKeyRing.cs | 4 | ||||
-rw-r--r-- | crypto/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. - * <p> - * 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 - */ + /// <summary> + /// 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. + /// </summary> + /// <remarks> + /// 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. + /// </remarks> + /// <param name="key">local public key.</param> + /// <param name="copy">copy of the public key (e.g. from a key server).</param> + /// <param name="joinTrustPackets">if true, trust packets from the copy are copied over into the resulting key. + /// </param> + /// <param name="allowSubkeySigsOnNonSubkey">if true, subkey signatures on the copy will be present in the + /// merged key, even if key was not a subkey before.</param> + /// <returns>joined key.</returns> 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. - * <p> + * <br/> * 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. - * <p> + * <br/> * 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; } |