Skip to content

Commit

Permalink
cleanup for rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Swapnil Tripathi <[email protected]>
  • Loading branch information
swaptr committed Nov 13, 2023
1 parent a1fad5b commit 1201804
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libvdrtools/indy-utils/src/crypto/base64/rust_base64.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
use base64::{
alphabet,
engine::{general_purpose, DecodePaddingMode, GeneralPurpose, GeneralPurposeConfig},
Engine,
};
use base64::{engine::general_purpose, Engine};
use indy_api_types::errors::prelude::*;

/// Default general purpose configuration, but padding decode mode of 'indifferent' (will decode
Expand All @@ -27,7 +23,7 @@ pub fn encode_urlsafe(doc: &[u8]) -> String {
}

pub fn decode_urlsafe(doc: &str) -> Result<Vec<u8>, IndyError> {
URL_SAFE_ANY_PADDING.decode(doc).map_err(|e| {
general_purpose::URL_SAFE.decode(doc).map_err(|e| {
e.to_indy(
IndyErrorKind::InvalidStructure,
"Invalid base64URL_SAFE sequence",
Expand Down

0 comments on commit 1201804

Please sign in to comment.