summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 72fb58f..5a50355 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -24,10 +24,8 @@ pub use view::*;
24pub use ipnet; 24pub use ipnet;
25 25
26#[doc(hidden)] 26#[doc(hidden)]
27pub const fn __decode_wg_key_const( 27pub const fn __decode_wg_key_const(encoded: &str) -> Key {
28 encoded: &str, 28 Key::new_unchecked_from(key::decode_wg_key_const(encoded))
29) -> [u8; netlink_packet_wireguard::WireguardAttribute::WG_KEY_LEN] {
30 key::decode_wg_key_const(encoded)
31} 29}
32 30
33/// Creates a [`Key`] from a canonical WireGuard base64 literal at compile time. 31/// Creates a [`Key`] from a canonical WireGuard base64 literal at compile time.
@@ -48,7 +46,7 @@ pub const fn __decode_wg_key_const(
48#[macro_export] 46#[macro_export]
49macro_rules! key { 47macro_rules! key {
50 ($value:literal) => { 48 ($value:literal) => {
51 $crate::Key::new_unchecked_from($crate::__decode_wg_key_const($value)) 49 $crate::__decode_wg_key_const($value)
52 }; 50 };
53} 51}
54 52