Skip to content

Commit

Permalink
Merge branch 'main' of github.com:warp-tech/russh
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Dec 4, 2024
2 parents e2c6e3d + ac441a6 commit 74046d0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
10 changes: 0 additions & 10 deletions cryptovec/src/platform/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,3 @@ pub fn memset(ptr: *mut u8, value: i32, size: usize) {
std::ptr::write_bytes(ptr, byte_value, size);
}
}

pub fn memcpy(dest: *mut u32, src: *const u8, size: usize) {
unsafe {
// Convert dest to *mut u8 for byte-wise copying
let dest_bytes = dest as *mut u8;

// Use std::ptr::copy_nonoverlapping to copy the data
std::ptr::copy_nonoverlapping(src, dest_bytes, size);
}
}
6 changes: 0 additions & 6 deletions cryptovec/src/platform/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,3 @@ pub fn memset(ptr: *mut u8, value: i32, size: usize) {
libc::memset(ptr as *mut c_void, value, size);
}
}

pub fn memcpy(dest: *mut u32, src: *const u8, size: usize) {
unsafe {
libc::memcpy(dest as *mut c_void, src as *const c_void, size);
}
}
3 changes: 1 addition & 2 deletions russh-keys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ mod format;
#[doc(hidden)]
pub mod helpers;
pub use format::*;
pub use ssh_key::{self, Algorithm, Certificate, EcdsaCurve, HashAlg, PrivateKey, PublicKey};

// Reexports
pub use signature;
pub use ssh_encoding;
pub use ssh_key::{self, Algorithm, Certificate, EcdsaCurve, HashAlg, PrivateKey, PublicKey};

/// OpenSSH agent protocol implementation
pub mod agent;
Expand Down

0 comments on commit 74046d0

Please sign in to comment.