### Install Yopass.API using .NET CLI Source: https://github.com/fradav/yopass.api/blob/main/README.md Add the Yopass.API library to your project using the .NET CLI. This is the first step to using the library. ```sh dotnet add package Yopass.API ``` -------------------------------- ### Restore and Build Project using .NET CLI Source: https://github.com/fradav/yopass.api/blob/main/README.md Commands to restore project dependencies and build the Yopass.API project. These commands are essential for local development and testing. ```sh dotnet restore dotnet build ``` -------------------------------- ### Encrypt and Decrypt Secrets in C# Source: https://github.com/fradav/yopass.api/blob/main/README.md Shows how to encrypt and decrypt secrets using the Yopass.API wrapper in C#. Custom Yopass service settings can be provided. ```csharp using Yopass; using System; // Create a wrapper with default settings var yopass = new Wrapper(); // Or create with custom settings // var yopass = new Wrapper(url: "https://yopass.se", api: "https://api.yopass.se", // expiration: 3600, oneTime: true); string secret = "my secret"; string encrypted = yopass.encrypt(secret); string decrypted = yopass.decryptString(encrypted); Console.WriteLine($"Encrypted: {encrypted}"); Console.WriteLine($"Decrypted: {decrypted}"); ``` -------------------------------- ### Encrypt and Decrypt Secrets in F# Source: https://github.com/fradav/yopass.api/blob/main/README.md Demonstrates how to encrypt and decrypt secrets using the Yopass.API wrapper in F#. You can use default settings or configure custom Yopass service parameters. ```fsharp open Yopass // Create a wrapper with default settings let yopass = Wrapper() // Or create with custom settings // let yopass = Wrapper(url = "https://yopass.se", api = "https://api.yopass.se", // expiration = 3600, oneTime = true) let secret = "my secret" let encrypted = yopass.encrypt secret let decrypted = encrypted |> yopass.decryptString printfn "Encrypted: %s" encrypted printfn "Decrypted: %s" decrypted ``` -------------------------------- ### Encrypt and Decrypt Secrets with a Custom Key in C# Source: https://github.com/fradav/yopass.api/blob/main/README.md Demonstrates using a custom encryption key for encrypting and decrypting secrets in C#. This provides an additional layer of security for your secrets. ```csharp using Yopass; var yopass = new Wrapper(key: "some key"); string secret = "my secret"; string encrypted = yopass.encrypt(secret); string decrypted = yopass.decryptString(encrypted); ``` -------------------------------- ### Encrypt and Decrypt Secrets with a Custom Key in F# Source: https://github.com/fradav/yopass.api/blob/main/README.md Encrypt and decrypt secrets using a custom encryption key in F#. This ensures that only applications with the specific key can decrypt the secrets. ```fsharp open Yopass let yopass = Wrapper(key = "some key") let secret = "my secret" let encrypted = secret |> yopass.encrypt let decrypted = encrypted |> yopass.decryptString ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.