Base3264Encoding Class

Summary

Base3264Encoding is a standard base 32/64 encoder/decoder The base 32 conversions are based on the standards except that padding is turned off and it is not case sensitive (by default). ZBase32, Crockford and a low profanity base 32 alphabets are included to support various use cases. Note that the crockford base32 encoding doesn't support the crockford checksum mechanism. RFC: http://tools.ietf.org/html/rfc4648 Base32: http://en.wikipedia.org/wiki/Base32 Base64: http://en.wikipedia.org/wiki/Base64 Crockford: http://www.crockford.com/wrmg/base32.html
Assembly
Rocket.Surgery.Extensions.dll
Namespace
Rocket.Surgery.Encoding
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["Base3264Encoding"] class Type type-node

Syntax

public static class Base3264Encoding

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Methods

Name Value Summary
Decode(EncodingType, string) byte[]
Decodes an encoded string to the original binary.
static
DecodeToString(EncodingType, string) string
Decodes an encoded string to its original string value (before it was encoded with the EncodeString method)
static
Encode(EncodingType, byte[]) string
Encodes bytes (such as binary url tokens) into a string.
static
EncodeString(EncodingType, string) string
Encodes a string to specified format encoding (base 32/64/etc), strings are first converted to a bom-free utf8 byte[] then to relevant encoding.
static
FromBase32Crockford(string) byte[]
To binary from base32 encoding designed for human readability or OCR / hand writing recognition situations (non symmetric conversion - i.e. 1IiLl all mean the same thing). Case insensitive, no padding.
static
FromBase32CrockfordToString(string) string
To string from base32 encoding designed for human readability or OCR / hand writing recognition situations (non symmetric conversion - i.e. 1IiLl all mean the same thing). Case insensitive, no padding. Uses bom-free utf8 for string to binary encoding.
static
FromBase32LowProfanity(string) byte[]
To binary from base32 encoding with alphabet designed to reduce accidental profanity in output (no padding, case SENSITIVE)
static
FromBase32LowProfanityToString(string) string
To string from base32 encoding with alphabet designed to reduce accidental profanity in output (no padding, case SENSITIVE) - uses bom-free utf8 for string to binary encoding
static
FromBase32Url(string) byte[]
To binary from "base32 url" per rfc (standard base 32 without padding, no padding, case insensitive)
static
FromBase32UrlToString(string) string
To string from "base32 url" per rfc (standard base 32 without padding, no padding, case insensitive) - uses bom-free utf8 for string to binary encoding
static
FromBase64(string) byte[]
To binary from standard base 64 (not url/uri safe)
static
FromBase64ToString(string) string
To string from base 64 (not url/uri safe) - uses bom-free utf8 for string to binary encoding
static
FromBase64Url(string) byte[]
To binary from "base64-url" per rfc standard (url safe 63rd/64th characters and no padding)
static
FromBase64UrlToString(string) string
To string from "base64-url" per rfc standard (url safe 63rd/64th characters and no padding) - uses bom-free utf8 for string to binary encoding
static
FromZBase32(string) byte[]
To binary from zbase32 (no padding, case insensitive) - uses bom-free utf8 for string to binary encoding
static
FromZBase32ToString(string) string
to string from zbase32 (no padding, case insensitive) - uses bom-free utf8 for string to binary encoding
static
ToBase32Crockford(byte[]) string
Binary to base32 encoding designed for human readability or OCR / hand writing recognition situations (non symmetric conversion - i.e. 1IiLl all mean the same thing). Case insensitive, no padding.
static
ToBase32Crockford(string) string
String to base32 encoding designed for human readability or OCR / hand writing recognition situations (non symmetric conversion - i.e. 1IiLl all mean the same thing). Case insensitive, no padding. Uses bom-free utf8 for string to binary encoding.
static
ToBase32LowProfanity(byte[]) string
Binary to base32 encoding with alphabet designed to reduce accidental profanity in output (no padding, case SENSITIVE)
static
ToBase32LowProfanity(string) string
String to base32 encoding with alphabet designed to reduce accidental profanity in output (no padding, case SENSITIVE) - uses bom-free utf8 for string to binary encoding
static
ToBase32Url(byte[]) string
Binary to "base32 url" per rfc (standard base 32 without padding, no padding, case insensitive)
static
ToBase32Url(string) string
String to "base32 url" per rfc (standard base 32 without padding, no padding, case insensitive) - uses bom-free utf8 for string to binary encoding
static
ToBase64(byte[]) string
Binary to standard base 64 (not url/uri safe)
static
ToBase64(string) string
String to standard base 64 (not url/uri safe) - uses bom-free utf8 for string to binary encoding
static
ToBase64Url(byte[]) string
Binary to "base64-url" per rfc standard (url safe 63rd/64th characters and no padding)
static
ToBase64Url(string) string
String to "base64-url" per rfc standard (url safe 63rd/64th characters and no padding) - uses bom-free utf8 for string to binary encoding
static
ToZBase32(byte[]) string
Binary to zbase32 (no padding, case insensitive)
static
ToZBase32(string) string
String to zbase32 (no padding, case insensitive) - uses bom-free utf8 for string to binary encoding
static