fix: i accidentally didnt make it public

This commit is contained in:
Teesh 2025-03-27 15:33:03 +02:00
parent a5f2f1866b
commit 197248260b
3 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,6 @@
const BASE16_ALPHABET: &[u8] = b"0123456789ABCDEF";
fn encode(to_encode: String) -> String {
pub fn encode(to_encode: String) -> String {
let bytes = to_encode.as_bytes();
let mut encoded = String::new();
@ -11,7 +11,7 @@ fn encode(to_encode: String) -> String {
encoded
}
fn decode(to_decode: String) -> String {
pub fn decode(to_decode: String) -> String {
let bytes = to_decode.as_bytes();
let mut decoded = Vec::new();

View file

@ -1,6 +1,6 @@
const BASE32_ALPHABET: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
fn encode(to_encode: String) -> String {
pub fn encode(to_encode: String) -> String {
let bytes = to_encode.as_bytes();
let mut encoded = String::new();
let mut bits = 0u32;
@ -27,7 +27,7 @@ fn encode(to_encode: String) -> String {
encoded
}
fn decode(to_decode: String) -> String {
pub fn decode(to_decode: String) -> String {
let bytes = to_decode.as_bytes();
let mut decoded = Vec::new();
let mut bits = 0u32;

View file

@ -1,6 +1,6 @@
const BASE64_ALPHABET: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
fn encode(to_encode: String) -> String {
pub fn encode(to_encode: String) -> String {
let bytes = to_encode.as_bytes();
let mut encoded = String::new();
let mut chunks = bytes.chunks_exact(3);
@ -33,7 +33,7 @@ fn encode(to_encode: String) -> String {
encoded
}
fn decode(to_decode: String) -> String {
pub fn decode(to_decode: String) -> String {
let bytes = to_decode.as_bytes();
let mut decoded = Vec::new();