XmobiTea.ProtonNet.Token 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package XmobiTea.ProtonNet.Token --version 1.0.0                
NuGet\Install-Package XmobiTea.ProtonNet.Token -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XmobiTea.ProtonNet.Token" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XmobiTea.ProtonNet.Token --version 1.0.0                
#r "nuget: XmobiTea.ProtonNet.Token, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XmobiTea.ProtonNet.Token as a Cake Addin
#addin nuget:?package=XmobiTea.ProtonNet.Token&version=1.0.0

// Install XmobiTea.ProtonNet.Token as a Cake Tool
#tool nuget:?package=XmobiTea.ProtonNet.Token&version=1.0.0                

XmobiTea.ProtonNet.Token

Installation

To install XmobiTea.ProtonNet.Token, clone the repository and include the project in your solution. You can also add it via a package manager if available.

Features

  • Binary Token Serialization/Deserialization: Provides interfaces and implementations for encoding and decoding tokens in binary format.
  • Attribute-Based Token Configuration: Allows properties in token classes to be marked with attributes to define their binary representation.
  • Support for Multiple Hash Algorithms: Includes implementations for various hashing algorithms like MD5, SHA1, SHA256, SHA384, SHA512, etc., to encode tokens securely.

Usage

Example 1: Basic Token Encoding and Decoding

var encoder = new SHA256TokenAlgorithmEncode();
var token = encoder.Encrypt(data);

var decoder = new ProtocolTokenBinaryDecode(new BinaryConverter());
var deserializedData = decoder.DeserializePayload(token);

Example 2: Attribute-Based Token Member

public class ExampleToken
{
    [TokenMember(0x01)]
    public int Id { get; set; }

    [TokenMember(0x02)]
    public string Name { get; set; }
}

Supported Data Types

  • Byte arrays for encoding and decoding.
  • Object arrays and dictionaries for structured data.
  • Custom attributes for property-based token configuration.

Extensibility

XmobiTea.ProtonNet.Token is designed with extensibility in mind. You can implement custom encoding/decoding algorithms by extending the ITokenAlgorithmEncode and ITokenBinaryDecode interfaces. You can also define custom attributes to enhance the token structure.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on XmobiTea.ProtonNet.Token:

Package Downloads
XmobiTea.ProtonNet.Server

XmobiTea.ProtonNet.Server is core of both SocketServer and WebApiServer.

GitHub repositories

This package is not used by any popular GitHub repositories.