GoeaLabs.Bedrock 1.1.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package GoeaLabs.Bedrock --version 1.1.1                
NuGet\Install-Package GoeaLabs.Bedrock -Version 1.1.1                
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="1.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GoeaLabs.Bedrock --version 1.1.1                
#r "nuget: GoeaLabs.Bedrock, 1.1.1"                
#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=1.1.1

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

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[]);
bool IsEqual(this byte[], byte[]);
bool IsEqual(this uint[], uint[]);
bool IsEmpty(this byte[]);
bool IsEmpty(this uint[]);
  • Span extensions:
bool IsEqual(this Span<byte>, Span<byte>);
void Split(this Span<uint>, Span<byte>);
void Merge(this Span<byte>, Span<uint>);
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>);

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);
  • Integers scaling to arbitrary ranges:
ulong ScaleUnsigned64(ulong, ulong, ulong, ulong, ulong);
long ScaleSigned64(long, long, long, long, long);
BigInteger ScaleBigInt(BigInteger, BigInteger, BigInteger, BigInteger, BigInteger);
#if NET7_0_OR_GREATER
UInt128 ScaleUnsigned128(UInt128, UInt128, UInt128, UInt128, UInt128);
#endif
#if NET7_0_OR_GREATER
Int128 ScaleSigned128(Int128, Int128, Int128, Int128, Int128);
#endif

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.Crypto.Chaos

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

GoeaLabs.Crypto.Hydra

Hydra Encryption Cipher for .NET.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.2.0 199 3/1/2024
3.1.0 178 5/16/2023
3.0.0 183 5/3/2023
2.0.0 185 5/1/2023
1.1.1 219 3/29/2023
1.1.0 191 3/28/2023
1.0.0 370 2/15/2023