C++ Rest SDK
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Public Types | Public Member Functions | List of all members
utility::nonce_generator Class Reference

Nonce string generator class. More...

#include <asyncrt_utils.h>

Public Types

enum  { default_length = 32 }
 Define default nonce length. More...
 

Public Member Functions

 nonce_generator (int length=default_length)
 Nonce generator constructor. More...
 
_ASYNCRTIMP utility::string_t generate ()
 Generate a nonce string containing random alphanumeric characters (A-Za-z0-9). Length of the generated string is set by length(). More...
 
int length () const
 Get length of generated nonce string. More...
 
void set_length (int length)
 Set length of the generated nonce string. More...
 

Detailed Description

Nonce string generator class.

Member Enumeration Documentation

anonymous enum

Define default nonce length.

Constructor & Destructor Documentation

utility::nonce_generator::nonce_generator ( int  length = default_length)
inline

Nonce generator constructor.

Parameters
lengthLength of the generated nonce string.

Member Function Documentation

_ASYNCRTIMP utility::string_t utility::nonce_generator::generate ( )

Generate a nonce string containing random alphanumeric characters (A-Za-z0-9). Length of the generated string is set by length().

Returns
The generated nonce string.
int utility::nonce_generator::length ( ) const
inline

Get length of generated nonce string.

Returns
Nonce string length.
void utility::nonce_generator::set_length ( int  length)
inline

Set length of the generated nonce string.

Parameters
lengthLenght of nonce string.

The documentation for this class was generated from the following file: