Update README

This commit is contained in:
2025-03-18 12:54:14 +13:00
parent 93108d7032
commit 4b78d0619b
14 changed files with 2 additions and 3304 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +0,0 @@
using System;
using System.Diagnostics;
namespace CSSUDII.Sodium.Interop
{
/// <summary>Defines the annotation found in a native declaration.</summary>
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
[Conditional("DEBUG")]
internal sealed partial class NativeAnnotationAttribute : Attribute
{
private readonly string _annotation;
/// <summary>Initializes a new instance of the <see cref="NativeAnnotationAttribute" /> class.</summary>
/// <param name="annotation">The annotation that was used in the native declaration.</param>
public NativeAnnotationAttribute(string annotation)
{
_annotation = annotation;
}
/// <summary>Gets the annotation that was used in the native declaration.</summary>
public string Annotation => _annotation;
}
}

View File

@@ -1,23 +0,0 @@
using System;
using System.Diagnostics;
namespace CSSUDII.Sodium.Interop
{
/// <summary>Defines the type of a member as it was used in the native signature.</summary>
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = true)]
[Conditional("DEBUG")]
internal sealed partial class NativeTypeNameAttribute : Attribute
{
private readonly string _name;
/// <summary>Initializes a new instance of the <see cref="NativeTypeNameAttribute" /> class.</summary>
/// <param name="name">The name of the type that was used in the native signature.</param>
public NativeTypeNameAttribute(string name)
{
_name = name;
}
/// <summary>Gets the name of the type that was used in the native signature.</summary>
public string Name => _name;
}
}

View File

@@ -1,16 +0,0 @@
using System.Runtime.CompilerServices;
namespace CSSUDII.Sodium.Interop
{
public partial struct crypto_aead_aes256gcm_state
{
[NativeTypeName("unsigned char[512]")]
public _opaque_e__FixedBuffer opaque;
[InlineArray(512)]
public partial struct _opaque_e__FixedBuffer
{
public byte e0;
}
}
}

View File

@@ -1,9 +0,0 @@
namespace CSSUDII.Sodium.Interop
{
public partial struct crypto_auth_hmacsha256_state
{
public crypto_hash_sha256_state ictx;
public crypto_hash_sha256_state octx;
}
}

View File

@@ -1,9 +0,0 @@
namespace CSSUDII.Sodium.Interop
{
public partial struct crypto_auth_hmacsha512256_state
{
public crypto_hash_sha512_state ictx;
public crypto_hash_sha512_state octx;
}
}

View File

@@ -1,16 +0,0 @@
using System.Runtime.CompilerServices;
namespace CSSUDII.Sodium.Interop
{
public partial struct crypto_generichash_blake2b_state
{
[NativeTypeName("unsigned char[384]")]
public _opaque_e__FixedBuffer opaque;
[InlineArray(384)]
public partial struct _opaque_e__FixedBuffer
{
public byte e0;
}
}
}

View File

@@ -1,28 +0,0 @@
using System.Runtime.CompilerServices;
namespace CSSUDII.Sodium.Interop
{
public partial struct crypto_hash_sha256_state
{
[NativeTypeName("uint32_t[8]")]
public _state_e__FixedBuffer state;
[NativeTypeName("uint64_t")]
public ulong count;
[NativeTypeName("uint8_t[64]")]
public _buf_e__FixedBuffer buf;
[InlineArray(8)]
public partial struct _state_e__FixedBuffer
{
public uint e0;
}
[InlineArray(64)]
public partial struct _buf_e__FixedBuffer
{
public byte e0;
}
}
}

View File

@@ -1,34 +0,0 @@
using System.Runtime.CompilerServices;
namespace CSSUDII.Sodium.Interop
{
public partial struct crypto_hash_sha512_state
{
[NativeTypeName("uint64_t[8]")]
public _state_e__FixedBuffer state;
[NativeTypeName("uint64_t[2]")]
public _count_e__FixedBuffer count;
[NativeTypeName("uint8_t[128]")]
public _buf_e__FixedBuffer buf;
[InlineArray(8)]
public partial struct _state_e__FixedBuffer
{
public ulong e0;
}
[InlineArray(2)]
public partial struct _count_e__FixedBuffer
{
public ulong e0;
}
[InlineArray(128)]
public partial struct _buf_e__FixedBuffer
{
public byte e0;
}
}
}

View File

@@ -1,16 +0,0 @@
using System.Runtime.CompilerServices;
namespace CSSUDII.Sodium.Interop
{
public partial struct crypto_onetimeauth_poly1305_state
{
[NativeTypeName("unsigned char[256]")]
public _opaque_e__FixedBuffer opaque;
[InlineArray(256)]
public partial struct _opaque_e__FixedBuffer
{
public byte e0;
}
}
}

View File

@@ -1,34 +0,0 @@
using System.Runtime.CompilerServices;
namespace CSSUDII.Sodium.Interop
{
public partial struct crypto_secretstream_xchacha20poly1305_state
{
[NativeTypeName("unsigned char[32]")]
public _k_e__FixedBuffer k;
[NativeTypeName("unsigned char[12]")]
public _nonce_e__FixedBuffer nonce;
[NativeTypeName("unsigned char[8]")]
public __pad_e__FixedBuffer _pad;
[InlineArray(32)]
public partial struct _k_e__FixedBuffer
{
public byte e0;
}
[InlineArray(12)]
public partial struct _nonce_e__FixedBuffer
{
public byte e0;
}
[InlineArray(8)]
public partial struct __pad_e__FixedBuffer
{
public byte e0;
}
}
}

View File

@@ -1,7 +0,0 @@
namespace CSSUDII.Sodium.Interop
{
public partial struct crypto_sign_ed25519ph_state
{
public crypto_hash_sha512_state hs;
}
}

View File

@@ -1,23 +0,0 @@
namespace CSSUDII.Sodium.Interop
{
public unsafe partial struct randombytes_implementation
{
[NativeTypeName("const char *(*)()")]
public delegate* unmanaged[Cdecl]<sbyte*> implementation_name;
[NativeTypeName("uint32_t (*)()")]
public delegate* unmanaged[Cdecl]<uint> random;
[NativeTypeName("void (*)()")]
public delegate* unmanaged[Cdecl]<void> stir;
[NativeTypeName("uint32_t (*)(const uint32_t)")]
public delegate* unmanaged[Cdecl]<uint, uint> uniform;
[NativeTypeName("void (*)(void *const, const size_t)")]
public delegate* unmanaged[Cdecl]<void*, nuint, void> buf;
[NativeTypeName("int (*)()")]
public delegate* unmanaged[Cdecl]<int> close;
}
}