> For the complete documentation index, see [llms.txt](https://beytullahakyuz.gitbook.io/securebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://beytullahakyuz.gitbook.io/securebase/tr/.net/kullanim.md).

# Kullanım

{% tabs %}
{% tab title="Metin" %}

```csharp
//SecureBase.SBEncoding sbencoding = SecureBase.SBEncoding.UNICODE;
SecureBase.SBEncoding sbencoding = SecureBase.SBEncoding.UTF8;

SecureBase bs = new SecureBase(sbencoding);
bs.SetSecretKey(secretkey);

//Encoding
string encodeddata = bs.Encode(data);

//Decoding
string decodeddata = bs.Decode(data);
```

{% endtab %}

{% tab title="Dosya" %}

```csharp
SecureBase sb = new SecureBase(SecureBase.SBEncoding.UTF8);
sb.SetSecretKey("xcompany-secret-key");

//Encoding
string filedata = File.ReadAllText("data.txt");
File.WriteAllText("encoded.txt", sb.Encode(filedata));

//Decoding
string fileencoded = File.ReadAllText("encoded.txt");
File.WriteAllText("decoded.txt", sb.Decode(fileencoded));
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
[**Github**](https://github.com/beytullahakyuz/securebase-dotnet)'ta bulunan [SecureBaseApp](https://github.com/beytullahakyuz/securebase-dotnet/tree/main/demos/SecureBaseApp/SecureBaseApp) uygulaması üzerinden örnek kullanımları inceleyebilirsiniz.
{% endhint %}

***
