otplus-core 0.0.3

Core cryptographic library for OTPlus - A secure one-time password and key derivation system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use base64::{engine::general_purpose::STANDARD, Engine};

pub struct Helpers;

impl Helpers {
  pub fn base64_encode(data: &[u8]) -> String {
    STANDARD.encode(data)
  }

  pub fn base64_decode(data: &str) -> Result<Vec<u8>, base64::DecodeError> {
    STANDARD.decode(data)
  }
}