Files
Aishwariyaa Anand d2d4f3d1d8 chore: resolve warnings in v2 (#8373)
Co-authored-by: Aishwariyaa Anand <aishwariyaa.anand@Aishwariyaa-Anand-C3PGW02T6Y.local>
2025-06-22 11:28:23 +00:00

17 lines
496 B
Rust

//! Module for tokenization-related functionality
//!
//! This module provides types and functions for handling tokenized payment data,
//! including response structures and token generation utilities.
use crate::consts::TOKEN_LENGTH;
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
/// Generates a new token string
///
/// # Returns
/// A randomly generated token string of length `TOKEN_LENGTH`
pub fn generate_token() -> String {
use nanoid::nanoid;
nanoid!(TOKEN_LENGTH)
}