Function try_length

Source
pub const fn try_length(bytes: usize) -> Option<usize>
Expand description

Computes the length of the Base64 encoded data from the given length.

ยงExamples

use pkce_std::encoding::try_length;

assert_eq!(try_length(32), Some(43));

assert_eq!(try_length(usize::MAX), None);