mirror of
https://github.com/xavo95/repak.git
synced 2025-01-18 19:04:07 +00:00
Add into_reader to get the underlying reader back
This commit is contained in:
parent
de69a98d34
commit
a03dafaa15
1 changed files with 6 additions and 0 deletions
|
@ -56,6 +56,12 @@ fn decrypt(key: &Option<aes::Aes256Dec>, bytes: &mut [u8]) -> Result<(), super::
|
|||
}
|
||||
}
|
||||
|
||||
impl<R: io::Seek + io::Read> PakReader<R> {
|
||||
pub fn into_reader(self) -> R {
|
||||
self.reader
|
||||
}
|
||||
}
|
||||
|
||||
impl<R: io::Read + io::Seek> PakReader<R> {
|
||||
pub fn new_any(mut reader: R, key: Option<aes::Aes256Dec>) -> Result<Self, super::Error> {
|
||||
for ver in Version::iter() {
|
||||
|
|
Loading…
Reference in a new issue