Skip to content
 
 

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icon

Byte Encodings

Provides the easy way to convert bytes to any string format in dotnet core. Many formats (Hex, Base32, Base58, Base64 and more) are already included out of the box. Backward conversion from string to bytes are supported as well.

What you need to know

This is not predicatable length encoding like Hex or Base64. It converts bytes to BigInteger and expresses the number in a base which matches alphabet length.

What this means to you is

  • don't use it with bunch of bytes - it'll be slow,
  • converting from string you should know the expected bytes length

Instalation

Nothing fancy - install nuget package

Install-Package ByteEncodings 

Usage

Look for inspiration in Test/Inspiration.cs, but in shortcut, use class:

  • ByteEncoding - for bytes encodings to plenty string formats,
  • Alphabet - if you need own alphabets / formats,
  • BaseConverter - Integer arithmetic, number base convertion

Take a look in Test project for sample usage.

Like it? Give me a star!

Thank you! I appreciate your contribution, bug reports, thougths, stars 👍

Questions ❓ - just fill an issue.

Icon

Translation by diavd from the Noun Project

About

Encoding bytes to multiple text format, represent an integer in any base

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages