Skip to content

Commit

Permalink
Revert "BASE64_URL_SAFE_NO_PAD"
Browse files Browse the repository at this point in the history
This reverts commit c684876.
  • Loading branch information
ktmlm committed Jul 5, 2023
1 parent c684876 commit 851f7ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruc"
version = "5.0.11"
version = "5.0.10"
authors = ["rust-util-collections", "hui.fan@mail.ru"]
edition = "2021"
description = "Rust Util Collections"
Expand Down
6 changes: 3 additions & 3 deletions src/crypto/codec/base64/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::*;
use base64::prelude::{Engine, BASE64_URL_SAFE_NO_PAD};
use base64::prelude::{Engine, BASE64_STANDARD};

#[inline(always)]
pub fn encode<T: AsRef<[u8]>>(orig: T) -> String {
BASE64_URL_SAFE_NO_PAD.encode(orig)
BASE64_STANDARD.encode(orig)
}

#[inline(always)]
Expand All @@ -13,5 +13,5 @@ pub fn decode(encoded: &str) -> Result<Vec<u8>> {

#[inline(always)]
pub fn decode_generic<T: AsRef<[u8]>>(encoded: T) -> Result<Vec<u8>> {
BASE64_URL_SAFE_NO_PAD.decode(encoded).c(d!())
BASE64_STANDARD.decode(encoded).c(d!())
}

0 comments on commit 851f7ab

Please sign in to comment.