clan::Secret Class Reference - ClanLib SDK
Description: clan::Secret Class Reference

Public Member Functions | List of all members
clan::Secret Class Reference
clanCore Crypto

Key class. More...

`#include <secret.h>`

## Public Member Functions
| Secret ()
| Constructs a key (unset)
| Secret (unsigned int new_key_length)
| Constructs a key to a specified length.
unsigned char * | get_data () const
| Get the key data.
unsigned int | get_size () const
| Get the key size.

## Detailed Description

Key class.

This class zero's the key from memory when the class is destroyed

## Constructor & Destructor Documentation

## ◆ Secret() [1/2]

clan::Secret::Secret | ( |  | ) |

Constructs a key (unset)

## ◆ Secret() [2/2]

clan::Secret::Secret | ( | unsigned int | new_key_length | ) |

Constructs a key to a specified length.

The data is not initialised

Parameters

  new_key_length | = Length of the key

## Member Function Documentation

## ◆ get_data()

unsigned char * clan::Secret::get_data | ( |  | ) | const

Get the key data.

Returns
  The key

## ◆ get_size()

unsigned int clan::Secret::get_size | ( |  | ) | const

Get the key size.

Returns
  The key size

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

- secret.h