Repository navigation
OnixLabs.Core.Text.Base58FormatProvider
Represents a Base-58 format provider.
| Namespace | OnixLabs.Core.Text |
| Assembly | OnixLabs.Core.dll (NuGet) |
| Inheritance |
object → Enumeration<Base58FormatProvider> → Base58FormatProvider
|
| Implements |
IEquatable<Base58FormatProvider>, IComparable<Base58FormatProvider>, IComparable, IFormatProvider
|
public sealed class Base58FormatProvider : Enumeration<Base58FormatProvider>, IFormatProviderBase58FormatProvider is a smart enumeration that carries the alphabet used by Base58Codec to encode and decode Base-58 values. It derives from Enumeration<Base58FormatProvider> and implements IFormatProvider.
Three entries are declared, each representing a different real-world Base-58 alphabet variant: the Bitcoin alphabet (also used by Monero and IPFS), the Flickr alphabet, and the Ripple alphabet. Decoding fails if the input contains a character not present in the provider's alphabet.
Because the type derives from Enumeration<T>, all entries are also available through the inherited static query methods such as GetAll, FromName, and FromValue.
All fields are declared as public static readonly Base58FormatProvider.
| Field | Description |
|---|---|
Bitcoin |
The Bitcoin Base-58 format provider. Also the format used by Monero and IPFS. Alphabet 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. |
Flickr |
The Flickr Base-58 format provider. Alphabet 123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ. |
Ripple |
The Ripple Base-58 format provider. Alphabet rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz. |
public static readonly Base58FormatProvider Bitcoin;The Bitcoin Base-58 format provider. This is also the same format used by Monero and IPFS. Alphabet 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. This is the default provider used by Base58Codec.
public static readonly Base58FormatProvider Flickr;The Flickr Base-58 format provider. Alphabet 123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ. The Flickr alphabet reorders the Bitcoin alphabet, placing lowercase letters before uppercase.
public static readonly Base58FormatProvider Ripple;The Ripple Base-58 format provider. Alphabet rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz. Used by the Ripple cryptocurrency network.
| Property | Type | Description |
|---|---|---|
Alphabet |
string |
Gets the Base-58 alphabet associated with the current format provider. |
public string Alphabet { get; }Gets the alphabet of the current Base58FormatProvider instance.
| Method | Returns | Description |
|---|---|---|
GetFormat(Type?) |
object? |
Returns the current instance when formatType is typeof(Base58FormatProvider); otherwise, returns null. |
public object? GetFormat(Type? formatType)Returns the current instance when formatType is typeof(Base58FormatProvider); otherwise, returns null. This is the IFormatProvider contract method that allows the format provider to be passed to any API that accepts IFormatProvider.
| Parameter | Type | Description |
|---|---|---|
formatType |
Type? |
The type of format object to obtain. |
Returns — The current instance if formatType is typeof(Base58FormatProvider); otherwise, null.
ONIXLabs .NET Library · Repository · NuGet · License (Apache-2.0)
Copyright © ONIXLabs 2020. Licensed under the Apache License, Version 2.0.
- Enumeration<T>
- Optional<T>
- OptionalEqualityComparer<T>
- OptionalExtensions
- Result
- Result<T>
- ResultEqualityComparer<T>
- ResultExtensions
- Specification<T>
- Preconditions
- IValueEquatable<T>
- IValueComparable<T>
- IBinaryConvertible
- ISpanBinaryConvertible
- IMemoryBinaryConvertible
- ArrayExtensions
- ComparableExtensions
- DateTimeExtensions
- ISpanParsableExtensions
- ObjectExtensions
- RandomExtensions
- ReadOnlySequenceExtensions
- ReadOnlySpanExtensions
- StringExtensions
- Base16
- Base32
- Base58
- Base64
- IBaseCodec
- IBaseValue
- IBaseValue<T>
- Base16Codec
- Base32Codec
- Base58Codec
- Base64Codec
- Base16FormatProvider
- Base32FormatProvider
- Base58FormatProvider
- Base64FormatProvider
- EncodingExtensions
- ReadOnlySpanExtensions
- StringBuilderExtensions
- BigDecimal
- BigDecimalEqualityComparer
- BigDecimalOrdinalityComparer
- NumberInfo
- NumberInfoEqualityComparer
- NumberInfoOrdinalityComparer
- Int256
- Int512
- UInt256
- UInt512
- Float128
- Float256
- GenericMath
- NumericsExtensions
- ConversionMode
- ScaleMode
- Hash
- NamedHash
- Sha3
- Sha3Hash224
- Sha3Hash256
- Sha3Hash384
- Sha3Hash512
- Sha3Shake128
- Sha3Shake256
- MerkleTree
- MerkleTree<T>
- PrivateKey
- PublicKey
- NamedPrivateKey
- NamedPublicKey
- EcdhPrivateKey
- EcdhPublicKey
- EcdsaPrivateKey
- EcdsaPublicKey
- EddsaPrivateKey
- EddsaPublicKey
- RsaPrivateKey
- RsaPublicKey
- DigitalSignature
- DigitalSignatureAndPublicKey
- Salt
- Secret
- ICryptoPrimitive<T>
- IHashable
- IEcdhPrivateKey
- IEcdsaPrivateKey
- IEddsaPrivateKey
- IRsaPrivateKey
- IPrivateKeyDerivable<T>
- IPrivateKeyExportable
- IPrivateKeyImportable<T>
- IPrivateKeyPemImportable<T>
- IPrivateKeyPkcs8Exportable
- IPrivateKeyPkcs8Importable<T>
- IPrivateKeyPkcs8PemExportable
- IPrivateKeyRawExportable
- IPrivateKeyRawImportable<T>
- IPrivateKeyRawPemExportable
- IEcdhPublicKey
- IEcdsaPublicKey
- IEddsaPublicKey
- IRsaPublicKey
- IPublicKeyExportable
- IPublicKeyImportable<T>
- IPublicKeyPemExportable
- IPublicKeyPemImportable<T>
- IPublicKeyRawExportable
- IPublicKeyRawImportable<T>
- HashAlgorithmExtensions
- ReadOnlySpanExtensions