1use crate::prelude::*;
2use super::hex::{
3 encode_hex,
4 encode_hex_upper,
5 decode_hex
6};
7
8pub use super::hex::{
9 DecodeError,
10 TABLE_ENCODER_LEN,
11 TABLE_ENCODER_LOWER,
12 TABLE_ENCODER_UPPER
13};
14
15#[inline]
16pub fn encode_base16(bytes: &[u8]) -> String {
17 encode_hex(bytes)
18}
19
20#[inline]
21pub fn encode_base16_upper(bytes: &[u8]) -> String {
22 encode_hex_upper(bytes)
23}
24
25#[inline]
26pub fn decode_base16(bytes: &[u8]) -> Result<Vec<u8>, DecodeError> {
27 decode_hex(bytes)
28}