pub struct KeyBag { /* private fields */ }Expand description
Contains keys used for encrypting/decrypting data
Implementations§
Source§impl KeyBag
impl KeyBag
Sourcepub fn from_string(string: &str) -> CytrynaResult<Self>
pub fn from_string(string: &str) -> CytrynaResult<Self>
Makes an instance of KeyBag from a string in format compatible with keys returned by https://github.com/citra-emu/citra/raw/master/dist/dumpkeys/DumpKeys.gm9
Note that this script won’t dump all keys used in this library
Sourcepub fn set_key(&mut self, idx: KeyIndex, key: [u8; 16])
pub fn set_key(&mut self, idx: KeyIndex, key: [u8; 16])
Adds a key to KeyBag, overwriting previous data if there was any
Sourcepub fn get_key(&self, idx: KeyIndex) -> CytrynaResult<&[u8; 16]>
pub fn get_key(&self, idx: KeyIndex) -> CytrynaResult<&[u8; 16]>
Returns a key if it is contained in global KeyBag instance
Sourcepub fn global() -> CytrynaResult<&'static Self>
pub fn global() -> CytrynaResult<&'static Self>
Returns reference to the global KeyBag instance
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyBag
impl RefUnwindSafe for KeyBag
impl Send for KeyBag
impl Sync for KeyBag
impl Unpin for KeyBag
impl UnsafeUnpin for KeyBag
impl UnwindSafe for KeyBag
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more