Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ssh-encoding/src/base64.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//! Base64 support.

mod reader;
mod writer;

pub use self::{reader::Base64Reader, writer::Base64Writer};
pub use base64ct::{Base64, Base64Unpadded, Encoding, Error};
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Base64 reader support (constant-time).

use super::Reader;
use crate::Result;
use crate::{Reader, Result};

/// Inner constant-time Base64 reader type from the `base64ct` crate.
type Inner<'i> = base64ct::Decoder<'i, base64ct::Base64>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Base64 writer support (constant-time).

use super::Writer;
use crate::Result;
use crate::{Result, Writer};

/// Inner constant-time Base64 reader type from the `base64ct` crate.
type Inner<'o> = base64ct::Encoder<'o, base64ct::Base64>;
Expand Down
8 changes: 4 additions & 4 deletions ssh-encoding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ mod label;
mod reader;
mod writer;

#[cfg(feature = "base64")]
pub mod base64;

pub use crate::{
checked::CheckedSum,
decode::Decode,
Expand All @@ -42,10 +45,7 @@ pub use crate::{
};

#[cfg(feature = "base64")]
pub use {
crate::{reader::base64::Base64Reader, writer::base64::Base64Writer},
base64ct as base64,
};
pub use crate::{base64::Base64Reader, base64::Base64Writer};

#[cfg(feature = "pem")]
pub use {
Expand Down
3 changes: 0 additions & 3 deletions ssh-encoding/src/reader.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//! Reader trait and associated implementations.

#[cfg(feature = "base64")]
pub(crate) mod base64;

use crate::{decode::Decode, Error, Result};
use core::str;

Expand Down
3 changes: 0 additions & 3 deletions ssh-encoding/src/writer.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//! Writer trait and associated implementations.

#[cfg(feature = "base64")]
pub(crate) mod base64;

use crate::Result;

#[cfg(feature = "alloc")]
Expand Down