refactor: directly wrap structs

This commit is contained in:
2025-03-12 18:28:30 -04:00
parent 44f7b9a00f
commit 85729401e5
8 changed files with 50 additions and 80 deletions

View File

@@ -4,7 +4,7 @@ macro_rules! crypt {
macro_rules! crypt_with {
($algo:ident) => {{
let encoding = $options.get("encoding").unwrap_or_default();
let key = &$options.get::<UserDataRef<AesKey>>("key")?.inner;
let key = &$options.get::<UserDataRef<AesKey>>("key")?.0;
match encoding {
1 => $algo::<Base64Encoding>::$op($text, &key),
2 => $algo::<Base64rEncoding>::$op($text, &key),