Skip to content

Commit

Permalink
chore: Remove JWK feature
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Bergius <[email protected]>
  • Loading branch information
joonas authored and brooksmtownsend committed Jul 19, 2024
1 parent 9f0a58e commit 3678582
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 166 deletions.
6 changes: 0 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ cli = [

xkeys = ["dep:crypto_box"]

jwk = ["serde", "serde_json", "sha2"]

[[bin]]
name = "nk"
required-features = ["cli"]
Expand All @@ -49,10 +47,6 @@ exitfailure = { version = "0.5.1", optional = true }
env_logger = { version = "0.9", optional = true }
serde_json = { version = "1.0", optional = true }

# jwk dependencies
serde = { version = "1.0", optional = true, features = ["derive"] }
sha2 = { version = "0.10", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
# NOTE: We need this due to an underlying dependency being pulled in by
# `ed25519-dalek`. Even if we exclude `rand`, that crate pulls it in. `rand` pulls in the low level
Expand Down
3 changes: 0 additions & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ pub enum ErrorKind {
IncorrectKeyType,
/// Payload not valid (or failed to be decrypted)
InvalidPayload,
/// Thumbprint could not be calculated over the provided public key value
ThumbprintCalculationFailure,
/// Signature did not match the expected length (64 bytes)
InvalidSignatureLength,
}
Expand Down Expand Up @@ -75,7 +73,6 @@ impl ErrorKind {
ErrorKind::SignatureError => "Signature failure",
ErrorKind::IncorrectKeyType => "Incorrect key type",
ErrorKind::InvalidPayload => "Invalid payload",
ErrorKind::ThumbprintCalculationFailure => "Thumbprint calculation failure",
}
}
}
Expand Down
151 changes: 0 additions & 151 deletions src/jwk.rs

This file was deleted.

6 changes: 0 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ mod xkeys;
#[cfg(feature = "xkeys")]
pub use xkeys::XKey;

#[cfg(feature = "jwk")]
mod jwk;

#[cfg(feature = "jwk")]
pub use jwk::JsonWebKey;

const ENCODED_SEED_LENGTH: usize = 58;
const ENCODED_PUBKEY_LENGTH: usize = 56;

Expand Down

0 comments on commit 3678582

Please sign in to comment.