Skip to content

Commit d19ff79

Browse files
committed
age: Move native recipient types into submodule
1 parent 75731ce commit d19ff79

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

age/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,11 @@ pub use simple::encrypt_and_armor;
249249
// Identity types
250250
//
251251

252+
mod native;
253+
pub use native::scrypt;
254+
pub use native::x25519;
255+
252256
pub mod encrypted;
253-
pub mod scrypt;
254-
pub mod x25519;
255257

256258
#[cfg(feature = "plugin")]
257259
#[cfg_attr(docsrs, doc(cfg(feature = "plugin")))]

age/src/native.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub mod scrypt;
2+
pub mod x25519;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::{
2323
util::read::{base64_arg, decimal_digit_arg},
2424
};
2525

26-
pub(super) const SCRYPT_RECIPIENT_TAG: &str = "scrypt";
26+
pub(crate) const SCRYPT_RECIPIENT_TAG: &str = "scrypt";
2727
const SCRYPT_SALT_LABEL: &[u8] = b"age-encryption.org/v1/scrypt";
2828
const ONE_SECOND: Duration = Duration::from_secs(1);
2929

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const PUBLIC_KEY_PREFIX: &str = "age";
2727
pub(super) const X25519_RECIPIENT_TAG: &str = "X25519";
2828
const X25519_RECIPIENT_KEY_LABEL: &[u8] = b"age-encryption.org/v1/X25519";
2929

30-
pub(super) const EPK_LEN_BYTES: usize = 32;
31-
pub(super) const ENCRYPTED_FILE_KEY_BYTES: usize = FILE_KEY_BYTES + 16;
30+
pub(crate) const EPK_LEN_BYTES: usize = 32;
31+
pub(crate) const ENCRYPTED_FILE_KEY_BYTES: usize = FILE_KEY_BYTES + 16;
3232

3333
/// The standard age identity type, which can decrypt files encrypted to the corresponding
3434
/// [`Recipient`].

0 commit comments

Comments
 (0)