Skip to content

Commit 01c39e5

Browse files
committed
refactor: declutter source files, comments and tests
1 parent f654381 commit 01c39e5

5 files changed

Lines changed: 488 additions & 881 deletions

File tree

src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright 2025 Nelson Dominguez
22
// SPDX-License-Identifier: MIT OR Apache-2.0
33

4+
pub type Result<T> = std::result::Result<T, Error>;
5+
46
/// Errors that can occur during cryptographic operations.
57
#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)]
68
pub enum Error {
@@ -28,5 +30,3 @@ pub enum Error {
2830
#[error("decryption failed: {0}")]
2931
DecryptionFailed(String),
3032
}
31-
32-
pub type Result<T> = std::result::Result<T, Error>;

src/key.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ impl PublicKey {
2121
if n.is_zero() || g.is_zero() || h.is_zero() {
2222
return Err(Error::InvalidPublicKey);
2323
}
24+
2425
if g >= n || h >= n {
2526
return Err(Error::InvalidPublicKey);
2627
}

0 commit comments

Comments
 (0)