commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
798b6de6d7f29bfdb54585b6505185952d259fc6 | Tony Arcieri | 2020-06-10T04:41:44 | ecdsa: upgrade to `signature` ~1.1.0; `sha` v0.9 (#87)
These both depend on the `digest` v0.9 crate | diff --git a/Cargo.lock b/Cargo.lock
index 7287ec3..636a507 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -12,14 +12,14 @@ dependencies = [
[[package]]
name = "block-buffer"
-version = "0.7.3"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0940dc441f31689269e10ac70e... | 2 | 13 | 22 |
cf0a95431e76d4c00ce22fc4d8fa5552d3002acd | Tony Arcieri | 2020-05-01T18:56:56 | Bump `p256` and `k256` to v0.2
Release announcement:
https://www.reddit.com/r/rust/comments/gbjsr9/ann_rustcrypto_p256_and_k256_v020_pure_rust_nist/ | diff --git a/Cargo.lock b/Cargo.lock
index b6a879a..98fcbfe 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -120,9 +120,9 @@ dependencies = [
[[package]]
name = "k256"
-version = "0.1.0"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4407bc616f76afb6bccd8a813b86fe62275... | 2 | 6 | 6 |
7dd3c60ba1aab4686c0731460b07e1c66860b1e2 | Tony Arcieri | 2020-04-20T15:45:34 | ed25519: improve usage documentation
Adds usage examples of how to write code which is generic over an
underlying signing provider. | diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs
index 33309e7..8e623e8 100644
--- a/ed25519/src/lib.rs
+++ b/ed25519/src/lib.rs
@@ -6,20 +6,120 @@
//! This crate doesn't contain an implementation of Ed25519, but instead
//! contains an [`ed25519::Signature`][`Signature`] type which other crates can
//! use in c... | 1 | 103 | 3 |
cbf01646e68214722e4924e314d86cb5639ba644 | Tony Arcieri | 2020-04-18T18:30:24 | Upgrade to v1.0 release of the `signature` crate
More info on this release: https://github.com/RustCrypto/traits/issues/78 | diff --git a/Cargo.lock b/Cargo.lock
index 835da4d..9f35fc1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -177,9 +177,9 @@ dependencies = [
[[package]]
name = "signature"
-version = "1.0.0-pre.5"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7633506bfb9bb78fd228f8fa... | 6 | 10 | 10 |
f5cc8b709ebb397ccf9df405900ea0b1f38d4ae1 | Tony Arcieri | 2020-03-17T16:35:00 | ed25519: avoid serializing a length prefix with serde
Previously the serde serializer used `Serialize::serialize_bytes` which
accepts a slice and when serialized with e.g. bincode also includes a
length prefix on the signature. As it were, this made it incompatible
with the extant deserializer (and as such, this PR al... | diff --git a/Cargo.lock b/Cargo.lock
index 8b1d2d4..a38a8a1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,5 +1,15 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
+[[package]]
+name = "bincode"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-... | 3 | 57 | 6 |
b5ce35b51576bdc4ed92bd8dd805e5012d9d93d5 | Tony Arcieri | 2020-03-08T22:29:20 | ecdsa v0.5.0-pre | diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml
index 55d520d..2ecd5ed 100644
--- a/ecdsa/Cargo.toml
+++ b/ecdsa/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ecdsa"
-version = "0.4.0" # Also update html_root_url in lib.rs when bumping this
+version = "0.5.0-pre" # Also update html_root_url in li... | 2 | 2 | 2 |
3108aab9cbc407344e80f7110c99512f68787ee2 | Tony Arcieri | 2020-01-07T15:42:19 | Upgrade 'elliptic-curve' crate to v0.3
...and use the `p256`, `p384`, and `k256` crates | diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml
index df442e9..b380320 100644
--- a/ecdsa/Cargo.toml
+++ b/ecdsa/Cargo.toml
@@ -15,7 +15,7 @@ categories = ["cryptography", "no-std"]
keywords = ["crypto", "ecc", "nist", "secp256k1", "signature"]
[dependencies.elliptic-curve]
-version = "0.2.0"
+version = "0... | 6 | 36 | 10 |
f9b4ddda106a86735d5f23243e994b88ee844b54 | Jack Grigg | 2019-12-07T23:03:21 | p256: Improve encoding APIs
The compressed and uncompressed encoding APIs now return the
corresponding precise type, which can be converted into a PublicKey
via PublicKey::from. | diff --git a/elliptic-curve-crate/src/p256.rs b/elliptic-curve-crate/src/p256.rs
index 567c8d2..3e20d9d 100644
--- a/elliptic-curve-crate/src/p256.rs
+++ b/elliptic-curve-crate/src/p256.rs
@@ -12,9 +12,13 @@ mod util;
pub mod test_vectors;
use core::convert::TryInto;
+use generic_array::GenericArray;
use subtle::{... | 1 | 23 | 19 |
d2d6746e1607923a7556ff9bbdca1d62ad6c3991 | Jack Grigg | 2019-12-07T23:02:50 | impl From<[Un]compressedCurvePoint> for PublicKey | diff --git a/elliptic-curve-crate/src/weierstrass/public_key.rs b/elliptic-curve-crate/src/weierstrass/public_key.rs
index f3db434..379d1ef 100644
--- a/elliptic-curve-crate/src/weierstrass/public_key.rs
+++ b/elliptic-curve-crate/src/weierstrass/public_key.rs
@@ -133,3 +133,25 @@ where
write!(f, "PublicKey<{:... | 1 | 22 | 0 |
608546fa3e796f385b052aba12b115fd8cb1b9c7 | Jack Grigg | 2019-12-07T17:47:06 | p256: Optionally expose test vectors to downstream consumers | diff --git a/elliptic-curve-crate/Cargo.toml b/elliptic-curve-crate/Cargo.toml
index 795b3bc..6acedae 100644
--- a/elliptic-curve-crate/Cargo.toml
+++ b/elliptic-curve-crate/Cargo.toml
@@ -39,6 +39,7 @@ proptest = "0.9"
[features]
default = ["arithmetic", "getrandom", "weierstrass", "std", "zeroize"]
arithmetic = ["... | 5 | 262 | 255 |
32d20b68a9b33a02d7d6d93067527033a41b65b5 | Jack Grigg | 2019-12-07T17:24:08 | p256: Build without std feature | diff --git a/elliptic-curve-crate/Cargo.toml b/elliptic-curve-crate/Cargo.toml
index 7609ad5..795b3bc 100644
--- a/elliptic-curve-crate/Cargo.toml
+++ b/elliptic-curve-crate/Cargo.toml
@@ -25,6 +25,7 @@ default-features = false
[dependencies.subtle]
version = "2.2.2"
+default-features = false
[dependencies.zeroi... | 3 | 4 | 3 |
de02bcb7ec1cdb6c4b198d4cbfec166c03f5089a | Jack Grigg | 2019-12-07T17:23:34 | p256: Build without getrandom feature | diff --git a/elliptic-curve-crate/src/p256/field.rs b/elliptic-curve-crate/src/p256/field.rs
index fd089b0..a655b1d 100644
--- a/elliptic-curve-crate/src/p256/field.rs
+++ b/elliptic-curve-crate/src/p256/field.rs
@@ -1,10 +1,12 @@
//! Field arithmetic modulo p = 2^{224}(2^{32} − 1) + 2^{192} + 2^{96} − 1
-use getran... | 1 | 5 | 1 |
4b45993061a9d2c8224fddbb1d31b792ddf83856 | Jack Grigg | 2019-12-07T16:52:37 | Add status note to p256 module | diff --git a/elliptic-curve-crate/src/p256.rs b/elliptic-curve-crate/src/p256.rs
index 4028c04..410b940 100644
--- a/elliptic-curve-crate/src/p256.rs
+++ b/elliptic-curve-crate/src/p256.rs
@@ -1,4 +1,9 @@
//! A pure-Rust implementation of group operations on secp256r1.
+//!
+//! # Status
+//!
+//! Currently, no actual... | 1 | 5 | 0 |
02d7100ff6fbe49e1ae66578846179a832ce8666 | Jack Grigg | 2019-12-07T16:50:58 | p256: FieldElement::generate | diff --git a/elliptic-curve-crate/src/p256/field.rs b/elliptic-curve-crate/src/p256/field.rs
index d8fe39f..fd089b0 100644
--- a/elliptic-curve-crate/src/p256/field.rs
+++ b/elliptic-curve-crate/src/p256/field.rs
@@ -1,5 +1,6 @@
//! Field arithmetic modulo p = 2^{224}(2^{32} − 1) + 2^{192} + 2^{96} − 1
+use getrando... | 1 | 23 | 0 |
d5b84e72c9c71b8b21f5ef88551855c78e50e39b | Jack Grigg | 2019-12-07T16:50:09 | p256: Compressed point decoding | diff --git a/elliptic-curve-crate/src/p256.rs b/elliptic-curve-crate/src/p256.rs
index 296fdb3..4028c04 100644
--- a/elliptic-curve-crate/src/p256.rs
+++ b/elliptic-curve-crate/src/p256.rs
@@ -10,7 +10,7 @@ use std::convert::TryInto;
use subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption};
use crate... | 1 | 49 | 2 |
deb44b72acfbe719e860bd3541fb9b4876dc227b | Jack Grigg | 2019-12-07T16:48:58 | p256: Field squaring, exponentiation, and square root | diff --git a/elliptic-curve-crate/src/p256/field.rs b/elliptic-curve-crate/src/p256/field.rs
index b4085f2..d8fe39f 100644
--- a/elliptic-curve-crate/src/p256/field.rs
+++ b/elliptic-curve-crate/src/p256/field.rs
@@ -312,6 +312,53 @@ impl FieldElement {
FieldElement::montgomery_reduce(w0, w1, w2, w3, w4, w5,... | 1 | 63 | 0 |
f4420139dc943140bd682b3923506c2eda586ec1 | Jack Grigg | 2019-12-07T16:47:45 | p256: Compressed point encoding | diff --git a/elliptic-curve-crate/src/p256.rs b/elliptic-curve-crate/src/p256.rs
index b2d9784..296fdb3 100644
--- a/elliptic-curve-crate/src/p256.rs
+++ b/elliptic-curve-crate/src/p256.rs
@@ -83,6 +83,15 @@ impl AffinePoint {
}
}
+ /// Returns the SEC-1 compressed encoding of this point, as a [`Publ... | 2 | 44 | 0 |
986e8d147fa5c1590fbc40e23657eb2564fdfb0d | Jack Grigg | 2019-12-07T16:45:07 | p256: Uncompressed point decoding and encoding | diff --git a/elliptic-curve-crate/src/p256.rs b/elliptic-curve-crate/src/p256.rs
index 4b97d77..b2d9784 100644
--- a/elliptic-curve-crate/src/p256.rs
+++ b/elliptic-curve-crate/src/p256.rs
@@ -5,3 +5,129 @@ mod util;
#[cfg(test)]
mod test_vectors;
+
+use std::convert::TryInto;
+use subtle::{Choice, ConditionallySel... | 2 | 145 | 2 |
1a7080ab05b846a54c33b72de8147fdbb973fa83 | Jack Grigg | 2019-12-07T16:38:59 | p256: impl [Add, Sub, Mul] for FieldElement | diff --git a/elliptic-curve-crate/Cargo.toml b/elliptic-curve-crate/Cargo.toml
index bb00830..7609ad5 100644
--- a/elliptic-curve-crate/Cargo.toml
+++ b/elliptic-curve-crate/Cargo.toml
@@ -32,6 +32,7 @@ optional = true
default-features = false
[dev-dependencies]
+hex = "0.4"
proptest = "0.9"
[features]
diff --g... | 4 | 325 | 0 |
21c36ddfb28d3156fd5969a5b2133dfac362f59e | Jack Grigg | 2019-12-07T16:35:53 | p256: Field element decoding and encoding | diff --git a/elliptic-curve-crate/src/p256/field.rs b/elliptic-curve-crate/src/p256/field.rs
index 25a872f..b029fe7 100644
--- a/elliptic-curve-crate/src/p256/field.rs
+++ b/elliptic-curve-crate/src/p256/field.rs
@@ -1,6 +1,7 @@
//! Field arithmetic modulo p = 2^{224}(2^{32} − 1) + 2^{192} + 2^{96} − 1
-use subtle::... | 1 | 78 | 1 |
8e932da6dd065b115b7946c2bd507f05362d788c | Jack Grigg | 2019-12-07T16:34:44 | p256: Field multiplication
Field elements are now stored in Montgomery form. | diff --git a/elliptic-curve-crate/src/p256/field.rs b/elliptic-curve-crate/src/p256/field.rs
index a91f070..25a872f 100644
--- a/elliptic-curve-crate/src/p256/field.rs
+++ b/elliptic-curve-crate/src/p256/field.rs
@@ -2,7 +2,7 @@
use subtle::{Choice, ConstantTimeEq};
-use super::util::{adc, sbb};
+use super::util::... | 2 | 138 | 3 |
d86c3bb365e8e3f0fa47a4dc20627d85eb4c5292 | Jack Grigg | 2019-12-07T16:32:15 | p256: Field addition and subtraction | diff --git a/elliptic-curve-crate/Cargo.toml b/elliptic-curve-crate/Cargo.toml
index 3ebf5d7..bb00830 100644
--- a/elliptic-curve-crate/Cargo.toml
+++ b/elliptic-curve-crate/Cargo.toml
@@ -23,13 +23,20 @@ optional = true
version = "0.12"
default-features = false
+[dependencies.subtle]
+version = "2.2.2"
+
[depende... | 5 | 172 | 1 |
2ed68bcc597c6225c1a1a27ea956a53d750c8922 | Tony Arcieri | 2019-12-07T02:25:38 | ecdsa: Re-export PublicKey and SecretKey | diff --git a/ecdsa/src/curve.rs b/ecdsa/src/curve.rs
index 25ed104..169079e 100644
--- a/ecdsa/src/curve.rs
+++ b/ecdsa/src/curve.rs
@@ -5,9 +5,6 @@ pub mod nistp256;
pub mod nistp384;
pub mod secp256k1;
-pub use elliptic_curve::{
- self,
- weierstrass::{point::*, Curve},
-};
+pub use elliptic_curve::weierstr... | 2 | 2 | 4 |
627932214280f28a9b7f88da057092536ac74e5f | Tony Arcieri | 2019-12-07T00:19:12 | ecdsa: Use curves from the `elliptic-curve` crate | diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml
index 9168c28..e2d2136 100644
--- a/ecdsa/Cargo.toml
+++ b/ecdsa/Cargo.toml
@@ -14,6 +14,12 @@ readme = "README.md"
categories = ["cryptography", "no-std"]
keywords = ["crypto", "ecc", "nist", "secp256k1", "signature"]
+[dependencies.elliptic-curve]
+v... | 10 | 36 | 276 |
3862e120468513ab7faa50afe5d8775fc678f25a | Tony Arcieri | 2019-12-05T17:22:57 | ed25519: Perform partial reduction check on `Signature`
Ensures that the three highest bits of the `s` scalar component of an
Ed25519 signature are unset.
This doesn't ensure that `s` is fully reduced (which would require a
full reduction check in the event that the 4th most significant bit is
set), however it will c... | diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs
index a39f643..8e18c14 100644
--- a/ed25519/src/lib.rs
+++ b/ed25519/src/lib.rs
@@ -90,16 +90,25 @@ impl<'a> TryFrom<&'a [u8]> for Signature {
type Error = Error;
fn try_from(bytes: &'a [u8]) -> Result<Self, Error> {
- // can't use `try_from` ourse... | 1 | 18 | 9 |
02d85a973403913e105344c7c7f280f74a640b05 | Tony Arcieri | 2019-10-29T15:41:52 | ecdsa: Fix uncompressed point sizes
They should be 2 * scalar size + 1-byte (0x04 tag) | diff --git a/ecdsa/src/curve/point.rs b/ecdsa/src/curve/point.rs
index 2b64503..46c1edb 100644
--- a/ecdsa/src/curve/point.rs
+++ b/ecdsa/src/curve/point.rs
@@ -15,7 +15,7 @@ pub type CompressedPointSize<ScalarSize> = <ScalarSize as Add<U1>>::Output;
/// Size of an uncompressed elliptic curve point for the given curve... | 1 | 6 | 1 |
515b673295e46dcead0a2aac5d3bb82e51b3da95 | Tony Arcieri | 2019-10-29T01:38:36 | ecdsa: elliptic curve points (compressed/uncompressed)
Adds `CompressedCurvePoint` and `UncompressedCurvePoint` as
representations of bytestrings serialized according to the
`Elliptic-Curve-Point-to-Octet-String` encoding as defined in
section 2.3.3 of SEC 1: Elliptic Curve Cryptography (Version 2.0):
https://www.sec... | diff --git a/ecdsa/src/asn1_signature.rs b/ecdsa/src/asn1_signature.rs
index f0b0e74..ab7fe13 100644
--- a/ecdsa/src/asn1_signature.rs
+++ b/ecdsa/src/asn1_signature.rs
@@ -26,7 +26,6 @@ use signature::Error;
pub type MaxOverhead = generic_array::typenum::U9;
/// Maximum size of an ASN.1 DER encoded signature for t... | 8 | 194 | 11 |
409cec8a072ad4a521ebbde19cf2ee76afdc7e08 | Tony Arcieri | 2019-10-28T20:59:36 | ecdsa: Asn1Signature <-> FixedSignature translation
Adapts the following code from BearSSL to support translation between
ASN.1 DER encoded and fixed size (a.k.a. "raw") signatures.
This additionally allows eagerly checking that ASN.1 DER-encoded
signatures are well-formed. | diff --git a/ecdsa/src/asn1_signature.rs b/ecdsa/src/asn1_signature.rs
index 28a9e14..01e2a4f 100644
--- a/ecdsa/src/asn1_signature.rs
+++ b/ecdsa/src/asn1_signature.rs
@@ -1,6 +1,6 @@
//! ASN.1 DER-encoded ECDSA signatures
-use crate::curve::Curve;
+use crate::{curve::Curve, scalar_pair::ScalarPair};
use core::{
... | 5 | 319 | 13 |
b58ef25a8724e89660eedbebb623717bd4247b3a | Tony Arcieri | 2019-10-28T20:04:09 | ecdsa: Add `DigestSignature` impls
...gated under a `digest` cargo feature.
These are useful when doing `derive(Signer)` or `derive(Verifier)` using
the `signature_derive` crate. | diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml
index 6248f62..de9e903 100644
--- a/ecdsa/Cargo.toml
+++ b/ecdsa/Cargo.toml
@@ -14,12 +14,18 @@ keywords = ["crypto", "ecc", "ecdsa", "signature", "signing"]
version = "0.12"
default-features = false
+[dependencies.sha2]
+version = "0.8"
+optional = true
+defaul... | 4 | 37 | 1 |
d4b3e706bebc50a6956dfd379ed87467c901206d | Tony Arcieri | 2019-10-28T19:40:00 | ecdsa: Add Asn1Signature type
Support for ASN.1 DER-encoded signatures.
Uses a GenericArray to store the variable-width signature, calculating
maximum DER framing overhead using typenum's type-level arithmetic. | diff --git a/ecdsa/src/asn1_signature.rs b/ecdsa/src/asn1_signature.rs
new file mode 100644
index 0000000..28a9e14
--- /dev/null
+++ b/ecdsa/src/asn1_signature.rs
@@ -0,0 +1,99 @@
+//! ASN.1 DER-encoded ECDSA signatures
+
+use crate::curve::Curve;
+use core::{
+ convert::{TryFrom, TryInto},
+ fmt::{self, Debug},
... | 8 | 167 | 49 |
31becf412cbe2dc953365a0a806bfecc878970fd | Tony Arcieri | 2019-10-28T17:54:06 | ecdsa: Add FixedSignature type
Type for representing fixed-sized (a.k.a. "raw") ECDSA signatures | diff --git a/ecdsa/src/curve.rs b/ecdsa/src/curve.rs
index 7ca443b..1d56fe6 100644
--- a/ecdsa/src/curve.rs
+++ b/ecdsa/src/curve.rs
@@ -1,72 +1,17 @@
//! Elliptic curves used by ECDSA
-use generic_array::{
- typenum::{U32, U48},
- ArrayLength,
-};
+pub mod nistp256;
+pub mod nistp384;
+pub mod secp256k1;
+
+p... | 6 | 159 | 64 |
a3ca6bb73e2ac9280e7317564ed40adb9bafa6f0 | Tony Arcieri | 2019-10-27T19:22:57 | ecdsa: Initial curves (NIST P-256/384, secp256k1)
Adds a `Curve` trait representing short Weirstrass curves suitable for
use with ECDSA, along with an initial set of curves and their associated
private scalar size. | diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml
index 754a5dc..69012c6 100644
--- a/ecdsa/Cargo.toml
+++ b/ecdsa/Cargo.toml
@@ -1,13 +1,15 @@
[package]
-name = "ecdsa"
-version = "0.0.0"
-authors = ["RustCrypto Developers"]
-license = "Apache-2.0 OR MIT"
-description = "Elliptic Curve Digital Signature Algorithm"
+na... | 3 | 95 | 10 |
26e21c8a4fbe68cf268db72e2e3d5d31a327770f | Tony Arcieri | 2019-10-27T16:54:03 | ed25519: optional serde support
Serializes and deserializes Ed25519 signatures as 64-byte "octet strings" | diff --git a/ed25519/Cargo.toml b/ed25519/Cargo.toml
index ab43005..8814f25 100644
--- a/ed25519/Cargo.toml
+++ b/ed25519/Cargo.toml
@@ -11,5 +11,12 @@ readme = "README.md"
categories = ["cryptography", "no-std"]
keywords = ["crypto", "curve25519", "ecc", "signature", "signing"]
-[dependencies]
-sign... | 2 | 75 | 15 |
fc835cd182b295113c78b4809f75073264a06c37 | Tony Arcieri | 2019-10-26T15:44:51 | signature: Use `Error::source` instead of `::cause`
This upgrades to the `std::error::Error` features for boxed,
downcastable error sources introduced in Rust 1.30, namely switching
from `Error::cause` to `Error::source`, which adds a `'static` bound and
therefore allows it to support downcasting.
Additionally, it de... | diff --git a/signature-crate/src/error.rs b/signature-crate/src/error.rs
index 146b89d..c864d97 100644
--- a/signature-crate/src/error.rs
+++ b/signature-crate/src/error.rs
@@ -5,71 +5,37 @@ use core::fmt::{self, Display};
#[cfg(feature = "std")]
use std::boxed::Box;
+/// Box containing a thread-safe + `'static` er... | 2 | 22 | 54 |
87f0b1b2f1719feaa9dc55fec93f028f3345db3c | Tony Arcieri | 2019-10-11T16:20:46 | DigestSignature: update description
Updates the description to note the `DigestSignature` marker trait is
useful for custom derive support as the blanket impl was removed. | diff --git a/signature-crate/src/signature.rs b/signature-crate/src/signature.rs
index 9fe5483..da8a4ba 100644
--- a/signature-crate/src/signature.rs
+++ b/signature-crate/src/signature.rs
@@ -29,10 +29,10 @@ pub trait Signature: AsRef<[u8]> + Debug + Sized {
/// - `H`: hash (a.k.a. digest) function
/// - `m`: messag... | 1 | 4 | 4 |
13674773a515eb56e928c5e65bd1c6df874437ed | Tony Arcieri | 2019-10-11T16:13:50 | Revert "signature-crate: Replace DigestSignature with derive attr"
This reverts commit 48e33d8758be5ce71c8c4787ed92a8a725d09f5f.
After updating my downstream consumers to try to use this, I encountered
an important case where this falls down: deriving `Signer` and
`Verifier` on generic types where the `Digest` *can o... | diff --git a/signature-crate/signature_derive/src/lib.rs b/signature-crate/signature_derive/src/lib.rs
index d49d37b..aa0953f 100644
--- a/signature-crate/signature_derive/src/lib.rs
+++ b/signature-crate/signature_derive/src/lib.rs
@@ -12,102 +12,96 @@ extern crate proc_macro;
use proc_macro2::TokenStream;
use quo... | 3 | 79 | 65 |
48e33d8758be5ce71c8c4787ed92a8a725d09f5f | Tony Arcieri | 2019-10-09T18:26:53 | signature-crate: Replace DigestSignature with derive attr
The `DigestSignature` trait was originally used as the marker trait used
by a blanket impl of `Signer` for `DigestSigner` and `Verifier` for
`DigestVerifier` (#12, #16).
Unfortunately, this approach turned out to be too inflexible to cover
real-world use cases... | diff --git a/signature-crate/signature_derive/src/lib.rs b/signature-crate/signature_derive/src/lib.rs
index aa0953f..d49d37b 100644
--- a/signature-crate/signature_derive/src/lib.rs
+++ b/signature-crate/signature_derive/src/lib.rs
@@ -12,96 +12,102 @@ extern crate proc_macro;
use proc_macro2::TokenStream;
use quo... | 3 | 65 | 79 |
f1f852cb90e09481de0a5ccd6708b48499a8a7bf | Tony Arcieri | 2019-10-09T16:49:14 | signature_derive: Upgrade to 1.x proc macro crates | diff --git a/signature-crate/signature_derive/Cargo.toml b/signature-crate/signature_derive/Cargo.toml
index 2f04cd7..a4df613 100644
--- a/signature-crate/signature_derive/Cargo.toml
+++ b/signature-crate/signature_derive/Cargo.toml
@@ -15,7 +15,7 @@ categories = ["cryptography", "no-std"]
proc-macro = true
[dep... | 2 | 8 | 8 |
9703638db94c49a732503a5ce3cfce9ad090e960 | Tony Arcieri | 2019-08-09T22:18:03 | ed25519: Initial implementation
Basic implementation with an initial `ed25519::Signature` type which
impls the `signature::Signature` trait. | diff --git a/ed25519/Cargo.toml b/ed25519/Cargo.toml
index c442aad..a88b92e 100644
--- a/ed25519/Cargo.toml
+++ b/ed25519/Cargo.toml
@@ -1,13 +1,18 @@
[package]
-name = "ed25519"
-version = "0.0.0"
-authors = ["RustCrypto Developers"]
-license = "Apache-2.0 OR MIT"
-description = "Edwards Digital Signature Algorithm (... | 2 | 84 | 10 |
3372991a042e6dea3dabef9a7ec8a021edef1759 | Tony Arcieri | 2019-06-07T16:21:34 | signature_derive v0.2.1 | diff --git a/signature-crate/signature_derive/Cargo.toml b/signature-crate/signature_derive/Cargo.toml
index 0553e54..2f04cd7 100644
--- a/signature-crate/signature_derive/Cargo.toml
+++ b/signature-crate/signature_derive/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "signature_derive"
-version = "0.2.0"... | 1 | 1 | 1 |
889ecce13c6445e24380e99b684b9b18dddaf570 | Tony Arcieri | 2019-06-07T16:08:37 | signature_derive: Use fully qualified paths
Replaces `use` directives with fully qualified paths. This prevents
potential name clashes in the event types have the same name as the
traits needed for the custom derive. | diff --git a/signature-crate/signature_derive/src/lib.rs b/signature-crate/signature_derive/src/lib.rs
index bd0686d..00cee90 100644
--- a/signature-crate/signature_derive/src/lib.rs
+++ b/signature-crate/signature_derive/src/lib.rs
@@ -18,14 +18,12 @@ use synstructure::{decl_derive, AddBounds};
fn derive_signer(mut s... | 1 | 18 | 26 |
7ce2694b07e61ae141f10606605b602e5b06c239 | Tony Arcieri | 2019-06-06T16:33:38 | Have DigestSigner/DigestVerifier take Digest instance
This is needed forcompatibility with ed25519-dalek's Ed25519ph:
https://docs.rs/ed25519-dalek/1.0.0-pre.1/ed25519_dalek/struct.Keypair.html#method.sign_prehashed
Until const generics land, this API feels a lot cleaner to me. It gets
all the `GenericArray` crap ou... | diff --git a/signature-crate/src/signer.rs b/signature-crate/src/signer.rs
index 2348c48..46ec9d0 100644
--- a/signature-crate/src/signer.rs
+++ b/signature-crate/src/signer.rs
@@ -1,7 +1,7 @@
//! Traits for generating digital signatures
#[cfg(feature = "digest")]
-use crate::digest::{generic_array::GenericArray, D... | 2 | 7 | 11 |
6c0c9e2c0f3c86c3c9762509e81d03cf96d27552 | Tony Arcieri | 2019-06-05T22:14:28 | Replace Digest-related blanket impls with methods
The current "clever" blanket impl (for which I'm entirely responsible!)
seems to have bounds which prevent anything from implementing `Signer`
or `Verifier` when the `digest` feature is enabled:
```
= note: conflicting implementation in crate `signature`:
... | diff --git a/signature-crate/src/signature.rs b/signature-crate/src/signature.rs
index 8d02146..8376a5a 100644
--- a/signature-crate/src/signature.rs
+++ b/signature-crate/src/signature.rs
@@ -22,19 +22,3 @@ pub trait Signature: AsRef<[u8]> + Debug + Sized {
self.as_slice().into()
}
}
-
-/// Marker trait... | 3 | 23 | 47 |
c9269c1bcdad3b26c2eb804d5dff28b17c82cafb | Tony Arcieri | 2019-04-01T14:31:13 | Add `try_*` methods to `*Signer` traits
For many signature providers, it's not possible for an error to occur
when creating a signature. Support for handling errors which occur when
computing signatures is intended for use with cloud KMS, HSMs, or other
hardware tokens where things like I/O errors are possible.
To si... | diff --git a/signature-crate/src/signer.rs b/signature-crate/src/signer.rs
index 4531258..537c6c9 100644
--- a/signature-crate/src/signer.rs
+++ b/signature-crate/src/signer.rs
@@ -11,7 +11,16 @@ use crate::{error::Error, Signature};
/// or connection to an HSM), returning a digital signature.
pub trait Signer<S: Sig... | 1 | 20 | 4 |
ea44a62d23659dd244a76ee4379d25eeb3f212d5 | Tony Arcieri | 2019-04-01T14:18:20 | Factor Digest-related traits out of 'digest' module
...allowing us to (once again) `pub extern crate digest`
This flattens out the crate's API, adding a `Digest*` prefix to all
traits that deal with `Digest` types, and re-exporting them from the
crate root. | diff --git a/signature-crate/src/digest/digestable.rs b/signature-crate/src/digest/digestable.rs
deleted file mode 100644
index 0eff397..0000000
--- a/signature-crate/src/digest/digestable.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-use crate::{
- digest::{self, Digest},
- error::Error,
- signature::Signature,
- sig... | 8 | 79 | 101 |
1bade9fe550103046b77c49cc797c43db16b9a6d | Tony Arcieri | 2019-04-01T14:18:08 | Add Error::cause() | diff --git a/signature-crate/src/error.rs b/signature-crate/src/error.rs
index 25bba9c..9a7be90 100644
--- a/signature-crate/src/error.rs
+++ b/signature-crate/src/error.rs
@@ -30,6 +30,12 @@ impl Error {
}
}
+ /// Borrow the error's underlying cause (if available)
+ #[cfg(feature = "std")]
+ p... | 1 | 6 | 0 |
564a42c5a549b5557284f8a94e2dfa196fd14034 | Tony Arcieri | 2019-04-01T14:01:34 | Have digest Signer/Verifier take digest output as an argument | diff --git a/signature-crate/src/digest/digestable.rs b/signature-crate/src/digest/digestable.rs
index 2fbed70..0eff397 100644
--- a/signature-crate/src/digest/digestable.rs
+++ b/signature-crate/src/digest/digestable.rs
@@ -25,7 +25,7 @@ where
T: digest::Signer<S::Digest, S>,
{
fn sign(&self, msg: &[u8]) ->... | 4 | 13 | 7 |
a1b59a16b42d9dad64ab87e6f081b9456ea7cd68 | Tony Arcieri | 2019-03-29T19:44:44 | Move blanket impls into 'digestable' module
The `Digestable` trait is used to constrain blanket impls of `Signer`
and `Verifier` for `digest::Signer` and `digest::Verifier` respectively.
Since that's what it's used for, it makes sense to put the blanket impls
in the same module. | diff --git a/signature-crate/src/digest/digestable.rs b/signature-crate/src/digest/digestable.rs
index 02f852f..2fbed70 100644
--- a/signature-crate/src/digest/digestable.rs
+++ b/signature-crate/src/digest/digestable.rs
@@ -1,4 +1,10 @@
-use crate::{digest::Digest, signature::Signature};
+use crate::{
+ digest::{se... | 3 | 29 | 23 |
5082a5139fb286f2b7fe097d05ea285faa05ce51 | Tony Arcieri | 2019-03-29T19:32:17 | Rename digest::Signature to 'Digestable'
Re-exported as `signature::Digestable`, and acts as a marker trait for
cases where signatures can be computed using `Digest`. | diff --git a/signature-crate/src/digest/signature.rs b/signature-crate/src/digest/digestable.rs
similarity index 67%
rename from signature-crate/src/digest/signature.rs
rename to signature-crate/src/digest/digestable.rs
index a54c7cc..02f852f 100644
--- a/signature-crate/src/digest/signature.rs
+++ b/signature-crate/sr... | 5 | 16 | 10 |
0ed928c3e1ce027c160aef1c1296fd8f693d94a9 | Tony Arcieri | 2019-03-29T19:19:19 | Digestable signatures: signature::digest::Signature
Adds a marker trait for `Signature` types computable as `S(H(m))` where:
- `S`: signature algorithm
- `H`: hash (a.k.a. digest) function
- `m`: message
For signature types that implement this trait, a blanket impl of
`Signer` will be provided for all types that
`im... | diff --git a/signature-crate/src/digest/mod.rs b/signature-crate/src/digest/mod.rs
index 406623b..ab0eb08 100644
--- a/signature-crate/src/digest/mod.rs
+++ b/signature-crate/src/digest/mod.rs
@@ -1,6 +1,7 @@
//! Support for using hash functions that impl the `Digest` trait in order
//! to hash the input message in o... | 4 | 37 | 3 |
58b4b11f3a77b39d4a56652764471e30aa016f72 | Tony Arcieri | 2019-03-29T18:57:42 | Rename to Signer/Verifier; add 'digest' module
Some sweeping refactoring here which hopefully cleans up the project
organization and helps simplify its implementation:
- `Sign` => `Signer`, `Verify` => `Verifier`
- Move all `digest`-related functionality under the `digest` module:
- `signature::digest::Signer`
- ... | diff --git a/signature-crate/src/digest/mod.rs b/signature-crate/src/digest/mod.rs
new file mode 100644
index 0000000..406623b
--- /dev/null
+++ b/signature-crate/src/digest/mod.rs
@@ -0,0 +1,11 @@
+//! Support for using hash functions that impl the `Digest` trait in order
+//! to hash the input message in order to com... | 6 | 22 | 24 |
c438c2c0388462c8e15eee9830a7a79684bf0d5a | Tony Arcieri | 2019-03-24T20:13:42 | SignDigest and VerifyDigest traits
Support for signing and verifying prehashed message `Digest`s, for use
with signature algorithms that support Initialize-Update-Finalize usage. | diff --git a/signature-crate/Cargo.toml b/signature-crate/Cargo.toml
index 773be11..f52a60a 100644
--- a/signature-crate/Cargo.toml
+++ b/signature-crate/Cargo.toml
@@ -12,8 +12,9 @@ keywords = ["crypto", "ecdsa", "ed25519", "signature", "signing"]
categories = ["cryptography", "no-std"]
[dependencies]
+dig... | 6 | 58 | 6 |
9fd884ce3753d722ee20a9ccdf4be834fd966588 | Tony Arcieri | 2019-03-24T20:00:14 | verify.rs: Initial Verify trait | diff --git a/signature-crate/src/sign.rs b/signature-crate/src/sign.rs
index 445856c..098528f 100644
--- a/signature-crate/src/sign.rs
+++ b/signature-crate/src/sign.rs
@@ -1,4 +1,4 @@
-//! Trait for producing digital signatures
+//! Trait for generating digital signatures of message bytestrings
use crate::{error::E... | 2 | 13 | 1 |
1f7efa65649d524eb5ed1ea86401db876f67c048 | Tony Arcieri | 2019-03-24T19:56:22 | sign.rs: Initial Sign trait
Trait for producing digital signatures | diff --git a/signature-crate/src/lib.rs b/signature-crate/src/lib.rs
index 85ccc2b..34a94a8 100644
--- a/signature-crate/src/lib.rs
+++ b/signature-crate/src/lib.rs
@@ -20,6 +20,7 @@ extern crate std;
mod error;
mod prelude;
+mod sign;
mod signature;
-pub use crate::{error::Error, signature::Signature};
+pub use... | 2 | 12 | 1 |
a8cd5499a2aecdafadeeaf92ac6a6ae7aa515892 | Tony Arcieri | 2019-03-24T19:47:42 | lib.rs: Improve comments and other minor cleanups | diff --git a/signature-crate/src/lib.rs b/signature-crate/src/lib.rs
index c8ecae2..85ccc2b 100644
--- a/signature-crate/src/lib.rs
+++ b/signature-crate/src/lib.rs
@@ -1,4 +1,6 @@
-//! Digital signature types and traits
+//! Traits which provide generic, object-safe APIs for generating and verifying
+//! digital signa... | 2 | 7 | 5 |
fccbfee2fbb4b42e4a8ce708d769d113bd5f8c71 | Tony Arcieri | 2019-03-24T19:46:53 | Cargo.toml: Add more information and improve formatting | diff --git a/signature-crate/Cargo.toml b/signature-crate/Cargo.toml
index c3a0721..773be11 100644
--- a/signature-crate/Cargo.toml
+++ b/signature-crate/Cargo.toml
@@ -1,17 +1,19 @@
[package]
-name = "signature"
-version = "0.0.0"
-authors = ["RustCrypto Developers"]
-license = "Apache-2.0 OR MIT"
-description = "Tra... | 1 | 12 | 10 |
b5803b676ee9b67b3818c491030ef29534426196 | Tony Arcieri | 2019-03-24T18:07:55 | Improved signature::error::Error with cause
Replaces the previous error enum with a struct that, on `std`, contains
an optional cause which is captured as `Box<std::error::Error>`.
This allows the core signature traits to remain object safe (since they
don't need a generic error type) but also allows passing through ... | diff --git a/signature-crate/src/error.rs b/signature-crate/src/error.rs
index 7c02e52..25bba9c 100644
--- a/signature-crate/src/error.rs
+++ b/signature-crate/src/error.rs
@@ -1,25 +1,86 @@
//! Signature error types
-use core::fmt;
+use core::fmt::{self, Display};
-/// Errors which can occur during signature oper... | 2 | 83 | 18 |
d55fcee4f24bec0ced91910c1a8673d4525143af | Tony Arcieri | 2019-03-24T18:41:13 | signature-crate: Fix rustfmt | diff --git a/signature-crate/src/lib.rs b/signature-crate/src/lib.rs
index e7d21eb..070b532 100644
--- a/signature-crate/src/lib.rs
+++ b/signature-crate/src/lib.rs
@@ -3,10 +3,7 @@
#![crate_name = "signature"]
#![crate_type = "lib"]
#![no_std]
-#![cfg_attr(
- all(feature = "nightly", not(feature = "std")),
- ... | 1 | 1 | 4 |
a573b588058c93fa47a402aacf676c3fa190fc7c | Tony Arcieri | 2018-11-10T21:39:43 | Initial Signature trait and Error enum
Adds a `Signature` trait which serialized signature types implement.
Adds an initial `Error` type to be returned from `Signature::from_bytes`
in the event the signature is not valid. | diff --git a/signature-crate/Cargo.toml b/signature-crate/Cargo.toml
index 0b0f89a..c3a0721 100644
--- a/signature-crate/Cargo.toml
+++ b/signature-crate/Cargo.toml
@@ -10,3 +10,8 @@ keywords = ["crypto", "signature", "signing"]
categories = ["cryptography", "no-std"]
[dependencies]
+
+[features]
+alloc = []
+defau... | 5 | 83 | 0 |
92a0f1a6f70e213ceced9ef2804422e9b644793d | Robert Collins | 2024-11-22T11:30:28 | Macos: disable parallel deletion by default
Most MacOS filesystems will be APFS these days, which appears to have a
global lock around readdir that leads to thrashing when performing
readdir concurrently from different threads.
https://gregoryszorc.com/blog/2018/10/29/global-kernel-locks-in-apfs/ | diff --git a/src/_impl.rs b/src/_impl.rs
index c31a281..354c278 100644
--- a/src/_impl.rs
+++ b/src/_impl.rs
@@ -26,9 +26,9 @@ cfg_if::cfg_if! {
}
pub(crate) fn default_parallel_mode() -> ParallelMode {
- #[cfg(feature = "parallel")]
+ #[cfg(all(feature = "parallel", not(target_os = "macos")))]
return Pa... | 3 | 38 | 34 |
c4651ca1cc288b833bf4781bddbca965c054ab92 | Robert Collins | 2024-11-21T13:17:42 | Shift parallel feature from a flag only to an optional runtime behaviour
- expose via the CLI
- add a new Builder and Remover struct to hold any other future things
we might make configurable. | diff --git a/src/_impl.rs b/src/_impl.rs
index 0a55754..c31a281 100644
--- a/src/_impl.rs
+++ b/src/_impl.rs
@@ -25,6 +25,13 @@ cfg_if::cfg_if! {
}
}
+pub(crate) fn default_parallel_mode() -> ParallelMode {
+ #[cfg(feature = "parallel")]
+ return ParallelMode::Parallel;
+ #[cfg(not(feature = "parallel"... | 4 | 204 | 89 |
bfecb916f3963fb2c286f780abb3ce8f36a93bdd | Chris Denton | 2024-09-24T11:34:09 | Release v0.8.4 (#77) | diff --git a/Cargo.toml b/Cargo.toml
index 1cf8c9b..dcc4c46 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ license = "MIT OR Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
-version = "0.8.3"
+version = "0.8.4"
[features]
cli = ... | 1 | 1 | 1 |
5ee668c52006ca774464b3a951c03b274d48431e | Chris Denton | 2024-09-20T13:19:54 | Free/NetBSD use EMLINK/EFTYPE instead of ELOOP
FreeBSD uses EMLINK https://man.freebsd.org/cgi/man.cgi?query=open&sektion=2&n=1#end
NetBSD uses EFTYPE https://man.netbsd.org/open.2#ERRORS | diff --git a/src/_impl/unix.rs b/src/_impl/unix.rs
index 8911f6f..653ef75 100644
--- a/src/_impl/unix.rs
+++ b/src/_impl/unix.rs
@@ -35,6 +35,20 @@ impl Io for UnixIo {
}
fn is_eloop(e: &io::Error) -> bool {
- e.raw_os_error() == Some(libc::ELOOP)
+ // When the `NO_FOLLOW` flag is set, POSIX s... | 1 | 15 | 1 |
e3470200b7782a651b3a25a561bed73cbc4591c5 | Robert Collins | 2024-07-24T14:38:56 | Windows dep and code tidyup (#72) | diff --git a/Cargo.toml b/Cargo.toml
index 6f789cd..2e32638 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,15 +10,15 @@ include = [
"Cargo.toml",
"LICENCE-APACHE",
"LICENCE-MIT",
- "src/**/*",
"README.md",
+ "src/**/*",
]
-keywords = ["utility", "filesystem", "remove_dir", "windows"]
+keywor... | 3 | 14 | 44 |
8cbf08f3e963b593559a3c0a454c271e40e00a54 | klensy | 2023-04-12T12:41:33 | remove unused deps and features (#67) | diff --git a/Cargo.toml b/Cargo.toml
index 0884122..1e2da69 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -26,7 +26,6 @@ default = []
log = ["dep:log"]
parallel = ["dep:rayon"]
-
[[bin]]
name = "remove-dir-all"
required-features = ["cli"]
@@ -36,21 +35,14 @@ cfg-if = "1.0.0"
clap = { version = "4.1.11", optional ... | 1 | 0 | 8 |
b91cb450cc048f8d338febcbef720745f8707587 | klensy | 2023-04-10T14:29:52 | fix doc (#66) | diff --git a/src/lib.rs b/src/lib.rs
index c8aec0a..f4c8bf0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -100,7 +100,7 @@
//! ...
//! [dependencies]
//! remove_dir_all = {version = "0.8"}
-//!
+//! ```
//! ## Future Plans
//! Open directory handles are kept in
//! a lg-spaced cache after the first 10 levels:
@@ -... | 1 | 1 | 3 |
2f0329e74ae8df37d21c6c917f75c7c8e81d774b | Robert Collins | 2023-03-24T23:23:07 | Release 0.8.2 | diff --git a/Cargo.toml b/Cargo.toml
index cbbfac6..07377cb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ license = "MIT OR Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
-version = "0.8.1"
+version = "0.8.2"
[features]
cli = ... | 1 | 1 | 1 |
3e9331aa7c66256ba7fa7b8fba087de856f255ff | Robert Collins | 2023-03-24T22:45:07 | Use fs_at new support for posix deletion on Windows | diff --git a/Cargo.toml b/Cargo.toml
index 79195b2..cbbfac6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,7 +35,7 @@ required-features = ["cli"]
cfg-if = "1.0.0"
clap = { version = "4.1.11", optional = true, features = ["derive"] }
env_logger = { version = "0.10.0", optional = true }
-fs_at = { version = "0.1" }
+... | 5 | 77 | 169 |
f0b5e3779e4208f43d5f415e459823a2f310d979 | Robert Collins | 2023-03-22T01:17:13 | remove_dir_all was not logging the remove-dir of the root it deleted (#63)
This makes troubleshooting a bit more understandable | diff --git a/src/_impl.rs b/src/_impl.rs
index 8d83a67..a592cff 100644
--- a/src/_impl.rs
+++ b/src/_impl.rs
@@ -69,7 +69,10 @@ pub(crate) fn remove_dir_all_path<I: io::Io, P: AsRef<Path>>(path: P) -> Result<
let debug_root = PathComponents::Path(if p.has_root() { p } else { Path::new(".") });
remove_dir_cont... | 1 | 4 | 1 |
c314fa4e28c6e511c4326acb907aa89908ae0264 | Robert Collins | 2023-03-21T02:49:21 | Add a little cli (#61) | diff --git a/Cargo.toml b/Cargo.toml
index e3ecaf3..79195b2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -21,12 +21,20 @@ repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
version = "0.8.1"
[features]
+cli = ["dep:clap", "dep:env_logger", "log", "parallel"]
default = []
log = ["dep:log"]
parallel = ... | 4 | 37 | 6 |
99331d2081e5e0a25e65f581492020b1581deabd | Benedikt Werner | 2023-02-25T18:19:20 | Make RemoveDir public (#59) | diff --git a/src/lib.rs b/src/lib.rs
index 4c4254a..7d64dd8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -147,7 +147,7 @@ doctest!("../README.md");
mod _impl;
/// Extension trait adding `remove_dir_all` support to [`std::fs::File`].
-trait RemoveDir {
+pub trait RemoveDir {
/// Remove the contents of the dir.
... | 1 | 1 | 1 |
0251b10c78cfba3e3f2ed5162f3c8ba7361c24aa | Benedikt Werner | 2023-02-25T15:43:52 | Improve documentation (#58) | diff --git a/src/lib.rs b/src/lib.rs
index 4daa0f5..4c4254a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,10 +1,10 @@
//! Reliably remove a directory and all of its children.
//!
//! This library provides an alternative implementation of
-//! `std::fs::remove_dir_all` from the Rust std library. It varies in the
+//... | 1 | 19 | 19 |
648e14673b625739fe54d67c188e2181da3d6a80 | Robert Mustacchi | 2022-11-09T16:06:44 | Regular tests should try to remove a directory too | diff --git a/src/lib.rs b/src/lib.rs
index 3e60be3..4daa0f5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -269,7 +269,9 @@ mod tests {
let tmp = TempDir::new()?;
let ours = tmp.path().join("t.mkdir");
let file = ours.join("file");
+ let nested = ours.join("another_dir");
fs::cre... | 1 | 2 | 0 |
e1066ef446381d97decbc9c9116c316148292cba | Erin Power | 2023-02-24T10:12:19 | Release 0.8.0
remove_dir_all@0.8.0
Generated by cargo-workspaces | diff --git a/Cargo.toml b/Cargo.toml
index 78c43d7..9b1c3a9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ license = "MIT OR Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
-version = "0.8.0-alpha.0"
+version = "0.8.0"
[features]... | 1 | 2 | 2 |
6ebf7f03505cfff57adca4a89efc64b6156e0749 | Alex Touchet | 2022-11-12T09:27:37 | Use SPDX license format (#50) | diff --git a/Cargo.toml b/Cargo.toml
index 0a678f7..3a68589 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ include = [
"README.md",
]
keywords = ["utility", "filesystem", "remove_dir", "windows"]
-license = "MIT/Apache-2.0"
+license = "MIT OR Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
... | 1 | 1 | 1 |
48e2043d5c3ae2874f4d65f0c8c4c5b0492c31fe | Josh Triplett | 2022-11-09T16:32:23 | Remove unused `num_cpus` dependency (#48)
`remove_dir_all` depends on `num_cpus`, but never invokes it | diff --git a/Cargo.toml b/Cargo.toml
index c8cab38..0a678f7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,14 +22,13 @@ version = "0.7.1-alpha.0"
[features]
default = ["parallel"]
-parallel = ["num_cpus", "rayon"]
+parallel = ["rayon"]
[dependencies]
cfg-if = "1.0.0"
[target.'cfg(windows)'.dependencies]
lo... | 1 | 1 | 2 |
720ca0ef0097d4a545a9603c1704fa0797a1b8fe | Niyaz Nigmatullin | 2022-10-21T10:48:36 | Update `windows-sys` to `0.42.0` (#47)
* Update windows-sys requirement from 0.36.0 to 0.42.0
Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs) to permit the latest version.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsof... | diff --git a/Cargo.toml b/Cargo.toml
index ab3c307..c8cab38 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -33,7 +33,7 @@ num_cpus = { version = "1.13", optional = true }
rayon = { version = "1.4", optional = true }
[target.'cfg(windows)'.dependencies.windows-sys]
-version = "0.36.0"
+version = "0.42.0"
features = [
... | 2 | 2 | 3 |
c5c5d11d1634e3612b1841496b4b298f4230bea9 | Robert Collins | 2021-03-05T23:58:31 | (cargo-release) start next development iteration 0.7.1-alpha.0 | diff --git a/Cargo.toml b/Cargo.toml
index ce95808..3e11e09 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,7 +15,7 @@ license = "MIT/Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
-version = "0.7.0"
+version = "0.7.1-alpha.0"
[target.'cfg(... | 1 | 1 | 1 |
ed8d8dff1753253fb4dd35ab91586599f5492a58 | Robert Collins | 2021-03-05T23:55:32 | (cargo-release) version 0.7.0 | diff --git a/Cargo.toml b/Cargo.toml
index cd1d835..ce95808 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,7 +15,7 @@ license = "MIT/Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
-version = "0.6.1"
+version = "0.7.0"
[target.'cfg(windows)... | 1 | 1 | 1 |
34cc3f7d63504b243447c4f4f043c164a141b48e | Ian Jackson | 2020-09-21T17:18:49 | tests: Break out prep() and its strudt
We are going to want to add another test that reuses this.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> | diff --git a/src/portable.rs b/src/portable.rs
index e6b734d..b76ea5b 100644
--- a/src/portable.rs
+++ b/src/portable.rs
@@ -25,6 +25,7 @@ mod test {
use crate::remove_dir_all;
use crate::remove_dir_contents;
use std::fs::{self, File};
+ use std::path::PathBuf;
use std::io;
fn expect_failu... | 1 | 20 | 8 |
6c9d685019fdd85a8aeaeee0cbbb82472563aac6 | Ian Jackson | 2020-07-24T22:53:41 | Add test case for remove_dir_contents
We check a few error behaviours too.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> | diff --git a/src/portable.rs b/src/portable.rs
index cfe5e0b..e6b734d 100644
--- a/src/portable.rs
+++ b/src/portable.rs
@@ -18,3 +18,43 @@ pub fn remove_dir_contents<P: AsRef<Path>>(path: P) -> io::Result<()> {
_remove_dir_contents(path)?;
Ok(())
}
+
+#[cfg(test)]
+mod test {
+ use tempfile::TempDir;
+ ... | 1 | 40 | 0 |
18f185bf4954ee95e50ab64478ac4d52b06a2a66 | Ian Jackson | 2020-09-21T16:47:52 | unix: Provide _remove_dir_contents
The implementation is relatively straightforward. It's a shame that
we need to reach for libc to get the error handling right!
The return type is different to that of Windows's fs:_remove_dir_all.
Unix does not need to canonicalize the path, so doesn't return
a canonicalised path.
... | diff --git a/Cargo.toml b/Cargo.toml
index b80fb5d..cd1d835 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,6 +23,9 @@ num_cpus = "1.13"
rayon = "1.4"
winapi = {version = "0.3", features = ["std", "errhandlingapi", "winerror", "fileapi", "winbase"]}
+[target.'cfg(not(windows))'.dependencies]
+libc = "0.2"
+
[dev-d... | 3 | 29 | 0 |
90071cb0db67dd41665c221f1eb6137c49d07ff8 | Ian Jackson | 2020-09-21T16:45:14 | fs: Provide _remove_dir_contents
This splits remove_dir_all into two: one part is the thin wrapper for
_delete_dir_contents, and the other part is responsible for deleting
the top-level directory.
We are going to expose a function for only deleting the contents, and
this will be its primary building block.
I provide... | diff --git a/src/fs.rs b/src/fs.rs
index 307e8f6..7c4e4a4 100644
--- a/src/fs.rs
+++ b/src/fs.rs
@@ -60,8 +60,8 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
// To handle files with names like `CON` and `morse .. .`, and when a
// directory structure is so deep it needs long path name... | 1 | 9 | 2 |
e2b8f280dfb879668569cec580d1c5e8989f022f | Erin Power | 2020-10-16T09:47:43 | Release 0.6.1
remove_dir_all@0.6.1
Generated by cargo-workspaces | diff --git a/Cargo.toml b/Cargo.toml
index a10b420..58f94ff 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,7 +15,7 @@ license = "MIT/Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
-version = "0.6.0"
+version = "0.6.1"
[target.'cfg(windows)... | 1 | 1 | 1 |
1ebdaa5a0154297c01a0219ab16765b02a590b91 | Erin Power | 2020-10-16T09:47:28 | update author | diff --git a/Cargo.toml b/Cargo.toml
index 63c19b0..a10b420 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-authors = ["Aaronepower <theaaronepower@gmail.com>"]
+authors = ["Erin P. <xampprocky@gmail.com>", "Robert C. <robertc@robertcollins.net>"]
categories = ["filesystem"]
description = "A safe... | 1 | 1 | 1 |
fe47b2e8dc1dbf960921477012985f9ee41f6ecf | Robert Collins | 2020-08-25T07:29:23 | Release 0.6.0 | diff --git a/Cargo.toml b/Cargo.toml
index fb17bc3..63c19b0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,7 +15,7 @@ license = "MIT/Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
-version = "0.5.3"
+version = "0.6.0"
[target.'cfg(windows)... | 1 | 1 | 7 |
61c03eb9bf9591d1a143e2f3079290b2c4d2fe0e | Robert Collins | 2020-08-14T22:44:11 | Threaded deletion on windows
This replaces the serial rename based implementation with a
parallel work-stealing implementation, which for large datasets with
large core-count CPUs shows substantial improvements. For small datasets
or single core CPUs the performance should be similar to the prior
implementation, thoug... | diff --git a/Cargo.toml b/Cargo.toml
index 0dc0d4a..fb17bc3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,18 @@ repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
version = "0.5.3"
[target.'cfg(windows)'.dependencies]
+log = "0.4.11"
+num_cpus = "1.13"
+rayon = "1.4"
winapi = {version = "0.3",... | 4 | 122 | 244 |
79d0b91ce6a6e318b36a9e09fe85349d2b8114d8 | Robert Collins | 2020-08-15T02:06:58 | Update to edition 2018 | diff --git a/Cargo.toml b/Cargo.toml
index 394956b..6c090e0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,23 +1,24 @@
[package]
authors = ["Aaronepower <theaaronepower@gmail.com>"]
+categories = ["filesystem"]
description = "A safe, reliable implementation of remove_dir_all for Windows"
+edition = "2018"
incl... | 3 | 14 | 15 |
0c218dad77262fbf47483d128feebb2770a8c05e | Erin Power | 2020-06-12T16:25:58 | Release 0.5.3
remove_dir_all@0.5.3
Generated by cargo-workspaces | diff --git a/Cargo.toml b/Cargo.toml
index 41b39d7..394956b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@ license = "MIT/Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/XAMPPRocky/remove_dir_all.git"
-version = "0.5.2"
+version = "0.5.3"
keywords = ["utili... | 1 | 2 | 2 |
11ba75fb338f4a3a2c1ee6e99f4dc7bda0c07cd1 | Guillaume Gomez | 2020-05-07T10:31:44 | Replace "cfg(test)" with "cfg(doctest)" for readme testing (#17) | diff --git a/src/lib.rs b/src/lib.rs
index 0dda5f6..f7b3dc6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,11 +9,11 @@
#[cfg(windows)]
extern crate winapi;
-#[cfg(test)]
+#[cfg(doctest)]
#[macro_use]
extern crate doc_comment;
-#[cfg(test)]
+#[cfg(doctest)]
doctest!("../README.md");
#[cfg(windows... | 1 | 2 | 2 |
dd12f96e082c5c609d29b0fabd82aebe92cc5b15 | Luca Bruno | 2020-01-17T12:34:13 | lib: improve docs and lints (#15)
This adds some sanity lints and fixes a few typos in docs. | diff --git a/src/fs.rs b/src/fs.rs
index bca7b2b..d81bd65 100644
--- a/src/fs.rs
+++ b/src/fs.rs
@@ -20,7 +20,8 @@ struct RmdirContext<'a> {
counter: u64,
}
-/// Reliably removes directory and all of it's children.
+/// Reliably removes a directory and all of its children.
+///
/// ```rust
/// extern c... | 2 | 10 | 1 |
e2747c6b76d49e17175c7b716ef6cbea61e13f2a | Igor Gnatenko | 2019-06-20T20:41:40 | chore: Include README.md (#14)
Otherwise doctests fail. | diff --git a/Cargo.toml b/Cargo.toml
index 3025090..41b39d7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,7 +5,8 @@ include = [
"Cargo.toml",
"LICENCE-APACHE",
"LICENCE-MIT",
- "src/**/*"
+ "src/**/*",
+ "README.md"
]
license = "MIT/Apache-2.0"
name = "remove_dir_all" | 1 | 2 | 1 |
e517baaab7d4e639a4756953409f0074ffff4e97 | Thomas den Hollander | 2018-12-23T15:34:00 | Run `cargo fix`, `cargo clippy`, `cargo fmt` (#8)
* Run `cargo fix`, `cargo clippy`, `cargo fmt`
* Replace try! by ? | diff --git a/src/fs.rs b/src/fs.rs
index 730582b..73c9187 100644
--- a/src/fs.rs
+++ b/src/fs.rs
@@ -1,8 +1,8 @@
use std::ffi::OsString;
use std::fs::{self, File, OpenOptions};
-use std::{io, ptr};
use std::os::windows::prelude::*;
use std::path::{Path, PathBuf};
+use std::{io, ptr};
use winapi::shared::m... | 3 | 52 | 40 |
8f5a95f0736b40adc67263def42fd1aca385393c | Aaron Power | 2018-04-19T14:01:28 | Version bump | diff --git a/Cargo.toml b/Cargo.toml
index a24db88..e90321e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT/Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/Aaronepower/remove_dir_all.git"
-version = "0.5.0"
+version = "0.5.1"
keywords = ["util... | 1 | 1 | 1 |
2c12da5f59fc8400576525feb49e129b9c5e0aec | Ryman | 2018-02-15T02:21:33 | Update to winapi 0.3 (#5) | diff --git a/Cargo.toml b/Cargo.toml
index 5efae0a..66ed9dc 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,5 +16,4 @@ keywords = ["utility", "filesystem", "remove_dir", "windows"]
categories = ["filesystem"]
[target.'cfg(windows)'.dependencies]
-winapi = "0.2"
-kernel32-sys = "0.2"
+winapi = { version = "0.3"... | 3 | 8 | 6 |
e8fa5b6c0da0181f5c7ef5cdb5b1ebf729e15074 | Aaron Power | 2017-11-19T09:30:44 | Version bump | diff --git a/Cargo.toml b/Cargo.toml
index 6e5e6d7..5efae0a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT/Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/Aaronepower/remove_dir_all.git"
-version = "0.3.0"
+version = "0.4.0"
keywords = ["util... | 1 | 1 | 1 |
a52b3a1206ca8ff387e3931d6b35b7b194d11617 | Rolf Karp | 2017-11-19T09:29:29 | Make API the same on all platforms, simplify Linux compilation (#3)
* Generalize API for Windows to make it the same for all platforms
* Avoid compiling Windows dependencies on Linux, fix warning | diff --git a/Cargo.toml b/Cargo.toml
index 18b8399..6e5e6d7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,6 +15,6 @@ version = "0.3.0"
keywords = ["utility", "filesystem", "remove_dir", "windows"]
categories = ["filesystem"]
-[dependencies]
+[target.'cfg(windows)'.dependencies]
winapi = "0.2"
kernel32-sys... | 3 | 6 | 3 |
f4b2612688ae67bfd876bbc0b3e128abb15226f9 | Aaron Power | 2017-10-04T10:56:08 | Version 0.3 | diff --git a/Cargo.toml b/Cargo.toml
index fd6a082..18b8399 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT/Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/Aaronepower/remove_dir_all.git"
-version = "0.2.0"
+version = "0.3.0"
keywords = ["util... | 1 | 1 | 1 |
b4ddad49206974adcff7fafb0cb87fe5768f44c8 | Ashley Mannix | 2017-10-01T16:26:01 | remove duplicate const (#2) | diff --git a/src/fs.rs b/src/fs.rs
index f788c61..b9eeaf1 100644
--- a/src/fs.rs
+++ b/src/fs.rs
@@ -7,7 +7,6 @@ use std::path::{Path, PathBuf};
use winapi::*;
use kernel::*;
-pub const ERROR_INSUFFICIENT_BUFFER: DWORD = 122;
pub const VOLUME_NAME_DOS: DWORD = 0x0;
struct RmdirContext<'a> { | 1 | 0 | 1 |
39c612eae7f88186fd4e310a556da2680c33e97d | Aaron Power | 2017-04-25T20:40:48 | 0.2 works on non windows systems | diff --git a/Cargo.toml b/Cargo.toml
index c26f520..fd6a082 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT/Apache-2.0"
name = "remove_dir_all"
readme = "README.md"
repository = "https://github.com/Aaronepower/remove_dir_all.git"
-version = "0.1.0"
+version = "0.2.0"
keywords = ["util... | 1 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.