Skip to content

Commit

Permalink
rage: Use Decryptor::new_buffered
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Mar 25, 2023
1 parent 7ef416a commit f337b55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions rage/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to Rust's notion of
to 1.0.0 are beta releases.

## [Unreleased]
### Changed
- Increased parsing speed of age file headers. For single-recipient encrypted
files, decryption throughput increases by 6% for medium (< 1MiB) files, and
over 40% for small (< 10kiB) files.

## [0.9.1] - 2022-03-24
### Added
Expand Down
2 changes: 1 addition & 1 deletion rage/src/bin/rage-mount/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ fn main() -> Result<(), Error> {
let types = opts.types;
let mountpoint = opts.mountpoint;

match age::Decryptor::new(ArmoredReader::new(file))? {
match age::Decryptor::new_buffered(ArmoredReader::new(file))? {
age::Decryptor::Passphrase(decryptor) => {
match read_secret(&fl!("type-passphrase"), &fl!("prompt-passphrase"), None) {
Ok(passphrase) => decryptor
Expand Down
2 changes: 1 addition & 1 deletion rage/src/bin/rage/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ fn decrypt(opts: AgeOptions) -> Result<(), error::DecryptError> {
],
);

match age::Decryptor::new(ArmoredReader::new(input))? {
match age::Decryptor::new_buffered(ArmoredReader::new(input))? {
age::Decryptor::Passphrase(decryptor) => {
if !opts.identity.is_empty() {
return Err(error::DecryptError::MixedIdentityAndPassphrase);
Expand Down

0 comments on commit f337b55

Please sign in to comment.