Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
TJ-91 committed Nov 7, 2023
1 parent de8d84c commit bcc9257
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/lib/crypto/dilithium_exdsa_composite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ pgp_dilithium_exdsa_composite_private_key_t::operator=(
return *this;
}

pgp_dilithium_exdsa_composite_private_key_t::pgp_dilithium_exdsa_composite_private_key_t(const pgp_dilithium_exdsa_composite_private_key_t &other)
pgp_dilithium_exdsa_composite_private_key_t::pgp_dilithium_exdsa_composite_private_key_t(
const pgp_dilithium_exdsa_composite_private_key_t &other)
{
*this = other;
}
Expand Down
3 changes: 2 additions & 1 deletion src/lib/crypto/dilithium_exdsa_composite.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ class pgp_dilithium_exdsa_composite_private_key_t
pgp_pubkey_alg_t pk_alg);
pgp_dilithium_exdsa_composite_private_key_t &operator=(
const pgp_dilithium_exdsa_composite_private_key_t &other);
pgp_dilithium_exdsa_composite_private_key_t(const pgp_dilithium_exdsa_composite_private_key_t &other);
pgp_dilithium_exdsa_composite_private_key_t(
const pgp_dilithium_exdsa_composite_private_key_t &other);
pgp_dilithium_exdsa_composite_private_key_t() = default;

rnp_result_t sign(rnp::RNG * rng,
Expand Down
3 changes: 2 additions & 1 deletion src/lib/crypto/kyber_ecdh_composite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ pgp_kyber_ecdh_composite_private_key_t::operator=(
return *this;
}

pgp_kyber_ecdh_composite_private_key_t::pgp_kyber_ecdh_composite_private_key_t(const pgp_kyber_ecdh_composite_private_key_t &other)
pgp_kyber_ecdh_composite_private_key_t::pgp_kyber_ecdh_composite_private_key_t(
const pgp_kyber_ecdh_composite_private_key_t &other)
{
*this = other;
}
Expand Down
3 changes: 2 additions & 1 deletion src/lib/crypto/kyber_ecdh_composite.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class pgp_kyber_ecdh_composite_private_key_t : public pgp_kyber_ecdh_composite_k
pgp_pubkey_alg_t pk_alg);
pgp_kyber_ecdh_composite_private_key_t &operator=(
const pgp_kyber_ecdh_composite_private_key_t &other);
pgp_kyber_ecdh_composite_private_key_t(const pgp_kyber_ecdh_composite_private_key_t &other);
pgp_kyber_ecdh_composite_private_key_t(
const pgp_kyber_ecdh_composite_private_key_t &other);
pgp_kyber_ecdh_composite_private_key_t() = default;

rnp_result_t decrypt(rnp::RNG * rng,
Expand Down
8 changes: 4 additions & 4 deletions src/librepgp/stream-packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ pgp_pk_sesskey_t::parse_material(pgp_encrypted_material_t &material)
}
#if defined(ENABLE_CRYPTO_REFRESH)
case PGP_PKA_X25519: {
uint8_t bt = 0;
uint8_t bt = 0;
const ec_curve_desc_t *ec_desc = get_curve_desc(PGP_CURVE_25519);
material.x25519.eph_key.resize(BITS_TO_BYTES(ec_desc->bitlen));
if (!pkt.get(material.x25519.eph_key.data(), material.x25519.eph_key.size())) {
Expand Down Expand Up @@ -1315,11 +1315,11 @@ pgp_pk_sesskey_t::write_material(const pgp_encrypted_material_t &material)
pktbody.add(material.eg.m);
break;
#if defined(ENABLE_CRYPTO_REFRESH)
case PGP_PKA_X25519:
{
case PGP_PKA_X25519: {
uint8_t enc_sesskey_length_offset = ((version == PGP_PKSK_V3) ? 1 : 0);
pktbody.add(material.x25519.eph_key);
pktbody.add_byte(static_cast<uint8_t>(material.x25519.enc_sess_key.size() + enc_sesskey_length_offset));
pktbody.add_byte(static_cast<uint8_t>(material.x25519.enc_sess_key.size() +
enc_sesskey_length_offset));
if (version == PGP_PKSK_V3) {
pktbody.add_byte(salg); /* added as plaintext */
}
Expand Down

0 comments on commit bcc9257

Please sign in to comment.