Yopass.API
0.9.0
dotnet add package Yopass.API --version 0.9.0
NuGet\Install-Package Yopass.API -Version 0.9.0
<PackageReference Include="Yopass.API" Version="0.9.0" />
<PackageVersion Include="Yopass.API" Version="0.9.0" />
<PackageReference Include="Yopass.API" />
paket add Yopass.API --version 0.9.0
#r "nuget: Yopass.API, 0.9.0"
#:package Yopass.API@0.9.0
#addin nuget:?package=Yopass.API&version=0.9.0
#tool nuget:?package=Yopass.API&version=0.9.0
Yopass.API
Yopass.API is a .NET library written in F# that provides a wrapper for interacting with the Yopass service, either the original one at https://yopass.se or self-hosted.
Yopass is a tool for securely sharing secrets using a one-time URL. When using the site directly encryption happens locally in the browser, and the encrypted secret is never sent to the server. This library does the same thing that the browser does, but at API level, encrypting and decrypting secrets inside your .NET application (F# or C#).
Features
- Encrypt and decrypt secrets using Yopass
- Generate secure encryption keys
- Configure Yopass service settings
Installation
To install the Yopass.API library, add it to your project using the .NET CLI:
dotnet add package Yopass.API
Usage
Encrypting and Decrypting Secrets
For F#
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
For C#
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}");
Using a Custom Key
open Yopass
let yopass = Wrapper(key = "some key")
let secret = "my secret"
let encrypted = secret |> yopass.encrypt
let decrypted = encrypted |> yopass.decryptString
using Yopass;
var yopass = new Wrapper(key: "some key");
string secret = "my secret";
string encrypted = yopass.encrypt(secret);
string decrypted = yopass.decryptString(encrypted);
Generating a Secure Key
Yopass.Wrapper options :
| Option | Description | Default |
|---|---|---|
url |
The URL of the Yopass service | https://yopass.se |
api |
The URL of the Yopass API | https://api.yopass.se |
expiration |
The expiration time in seconds | 3600 |
oneTime |
Whether the secret is one-time | true |
key |
The encryption key | Optional |
Building
Launch the build process using the .NET CLI:
dotnet restore
dotnet build
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
License
This project is licensed under the MIT License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- BouncyCastle.Cryptography (>= 2.5.1)
- FSharp.Core (>= 9.0.201)
- FsHttp (>= 15.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.0 | 149 | 3/14/2025 |