-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e55d957
commit edb4ca0
Showing
3 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use base64::{ | ||
alphabet, | ||
engine::{DecodePaddingMode, GeneralPurpose, GeneralPurposeConfig}, | ||
}; | ||
|
||
/// A default [GeneralPurposeConfig] configuration with a [decode_padding_mode] of | ||
/// [DecodePaddingMode::Indifferent] | ||
pub const LENIENT_PAD: GeneralPurposeConfig = | ||
GeneralPurposeConfig::new().with_decode_padding_mode(DecodePaddingMode::Indifferent); | ||
|
||
/// A [GeneralPurpose] engine using the [alphabet::URL_SAFE] base64 alphabet and | ||
/// [DecodePaddingMode::Indifferent] config to decode both padded and unpadded. | ||
pub const URL_SAFE_LENIENT: GeneralPurpose = GeneralPurpose::new(&alphabet::URL_SAFE, LENIENT_PAD); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ macro_rules! secret { | |
}}; | ||
} | ||
|
||
pub mod base64; | ||
pub mod openssl; | ||
pub mod qualifier; | ||
|
||
|