# KsefSecret

An owned secret buffer. Disposal clears owned bytes; the caller's original string and runtime HTTP header strings cannot be erased by this type.

Class 

`OfficeIMO.Invoicing.KSeF`

**Namespace**

`OfficeIMO.Invoicing.KSeF`

**Assembly**

`OfficeIMO.Invoicing.KSeF`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[KsefSecret.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.KSeF/KsefSecret.cs#L8)

**Implements**

`IDisposable`

**Modifiers**

sealed

An owned secret buffer. Disposal clears owned bytes; the caller's original string and runtime HTTP header strings cannot be erased by this type.

## Inheritance

- object
- KsefSecret

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 1

- Method [KsefClient.BeginTokenAuthenticationAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-begintokenauthenticationasync-officeimo-invoicing-ksef-ksefcontext-officeimo-invoicing-ksef-ksefsecret-threading-cancellationtoken) parameter `ksefToken`

Filter members 

Show inherited

## Constructors

`public KsefSecret(string value)` [#](#constructor-ctor-string)

[KsefSecret.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.KSeF/KsefSecret.cs#L8)

Copies a nonempty secret without control characters, bounded to 32 KiB in UTF-8.

Parameters

**value string required**

## Methods

`public void Dispose()` [#](#method-dispose)

[KsefSecret.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.KSeF/KsefSecret.cs#L31)

Clears the owned buffer. Already dispatched HTTP requests are unaffected.

`public override string ToString()` [#](#method-tostring)

[KsefSecret.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.KSeF/KsefSecret.cs#L29)

Never formats the secret.

Returns

`string`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

<!-- PowerForge markdown artifact sha256:206454859195DFAD94D013A9094BAF731E53330C482FF4FDD57A23D1FD4B873D -->
