MCPcopy Create free account
hub / github.com/echQoQ/RustSL / decode_payload

Function decode_payload

src/decode/mod.rs:4–7  ·  view source on GitHub ↗
(data: &[u8])

Source from the content-addressed store, hash-verified

2#[cfg(feature = "base32_decode")]
3#[allow(dead_code)]
4pub fn decode_payload(data: &[u8]) -> Option<Vec<u8>> {
5 let raw = std::str::from_utf8(data).ok()?;
6 base32::decode(base32::Alphabet::Rfc4648 { padding: true }, raw)
7}
8
9#[cfg(feature = "base64_decode")]
10#[allow(dead_code)]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected