Falsify.Core 1.0.0

Falsify is a body of methods designed to efficiently reject bad data. Falsify.Core contains the core interface for all falsifiers (Falsify.IFalsify).

Install-Package Falsify.Core -Version 1.0.0
dotnet add package Falsify.Core --version 1.0.0
<PackageReference Include="Falsify.Core" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Falsify.Core --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Falsify

Falsify is a body of methods designed to efficiently reject bad data.

A falsifier must prove that some given data does not conform to a given specification, using little memory and little time. Failure to falsify does not indicate the data is valid, but a successful falsification means the data can be rejected without further evaluation.

For example, given the claim "this data is PNG," a PNG falsifier must prove the claim is wrong without wholly loading the file into memory or decoding its data. For example, one cheap technique to prove a given file is not a PNG is to show it lacks the magic bytes. Other techniques can be added, provided that they are cheap.

The interface

Falsify.Core carries a single interface, written like so:

interface IFalsify {
	bool Falsify(Stream stream);
	Task<bool> FalsifyAsync(Stream stream);
}
  • An ideal implementation is thread-safe.

  • An ideal implementation returns false as soon as it is able to show the data does not meet its specification.

  • An ideal implementation reads as little of the stream as possible.

  • An ideal implementation does not keep large buffers.

Implementations

Falsify.Encodings

  • Base64URLEncoding

Falsify

Falsify is a body of methods designed to efficiently reject bad data.

A falsifier must prove that some given data does not conform to a given specification, using little memory and little time. Failure to falsify does not indicate the data is valid, but a successful falsification means the data can be rejected without further evaluation.

For example, given the claim "this data is PNG," a PNG falsifier must prove the claim is wrong without wholly loading the file into memory or decoding its data. For example, one cheap technique to prove a given file is not a PNG is to show it lacks the magic bytes. Other techniques can be added, provided that they are cheap.

The interface

Falsify.Core carries a single interface, written like so:

interface IFalsify {
	bool Falsify(Stream stream);
	Task<bool> FalsifyAsync(Stream stream);
}
  • An ideal implementation is thread-safe.

  • An ideal implementation returns false as soon as it is able to show the data does not meet its specification.

  • An ideal implementation reads as little of the stream as possible.

  • An ideal implementation does not keep large buffers.

Implementations

Falsify.Encodings

  • Base64URLEncoding

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 367 3/23/2018