GoeaLabs.Bedrock 3.1.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package GoeaLabs.Bedrock --version 3.1.0
NuGet\Install-Package GoeaLabs.Bedrock -Version 3.1.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="GoeaLabs.Bedrock" Version="3.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GoeaLabs.Bedrock --version 3.1.0
#r "nuget: GoeaLabs.Bedrock, 3.1.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 GoeaLabs.Bedrock as a Cake Addin
#addin nuget:?package=GoeaLabs.Bedrock&version=3.1.0

// Install GoeaLabs.Bedrock as a Cake Tool
#tool nuget:?package=GoeaLabs.Bedrock&version=3.1.0

GoeaLabs.Bedrock

GitHub GitHub release (latest SemVer) Nuget (with prereleases)

Project Description

A collection of general purpose helper methods used by my other libraries.

Compatibility

Compatible with .NET6 and higher, includes .NET7 build.

API(s)

  • Array extensions:
byte[] FillRandom(this byte[]);
uint[] FillRandom(this uint[]);
  • Span extensions:
void Split(this Span<uint>, Span<byte>);
void Merge(this Span<byte>, Span<uint>);
void Merge(this Span<byte>, Span<ulong>);
void Merge(this Span<uint>, Span<ulong>);
#if NET7_0_OR_GREATER
void Merge(this Span<uint>, Span<UInt128>);
#endif
void Xor(this Span<byte>, Span<byte>);
void FillRandom(this Span<byte>);

Note that Split and Merge above are endianness agnostic: you will get the same results even on IBM System/390, the only Big Endian platform with .NET support I am aware of.

  • Integers extensions:
void Halve(this ushort, out byte, out byte);
void Halve(this uint, out ushort, out ushort);
void Halve(this ulong, out uint, out uint);
#if NET7_0_OR_GREATER
void Halve(this UInt128, out ulong, out ulong);
#endif
ushort Merge(this byte, byte);
uint Merge(this ushort, ushort);
ulong Merge(this uint, uint);
#if NET7_0_OR_GREATER
UInt128 Merge(this ulong, ulong);
#endif
byte Xor(this byte, byte);

Installation

Install with NuGet Package Manager Console

Install-Package GoeaLabs.Bedrock

Install with .NET CLI

dotnet add package GoeaLabs.Bedrock
Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on GoeaLabs.Bedrock:

Package Downloads
GoeaLabs.Chaos The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

A cryptographically secure deterministic random number generator for .NET, based on RFC8439 ChaCha.

GoeaLabs.Hydra The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Hydra Encryption Cipher for .NET.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.1.0 144 5/16/2023
3.0.0 142 5/3/2023
2.0.0 151 5/1/2023
1.1.1 183 3/29/2023
1.1.0 157 3/28/2023
1.0.0 329 2/15/2023