Show / Hide Table of Contents

Class Base64NoPad

A codec for Base-64 (RFC 4648) with no padding.

Inheritance
Object
Base64NoPad
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Ipfs
Assembly: Ipfs.Core.dll
Syntax
public static class Base64NoPad
Remarks

A codec for Base-64, Encode(Byte[]) and Decode(String). Adds the extension method ToBase64NoPad(Byte[]) to encode a byte array and FromBase64NoPad(String) to decode a Base-64 string.

Methods

| Improve this Doc View Source

Decode(String)

Converts the specified String, which encodes binary data as base 64 digits, to an equivalent 8-bit unsigned integer array.

Declaration
public static byte[] Decode(string s)
Parameters
Type Name Description
String s

The base 64 string to convert.

Returns
Type Description
Byte[]

An array of 8-bit unsigned integers that is equivalent to s.

| Improve this Doc View Source

Encode(Byte[])

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 characters.

Declaration
public static string Encode(byte[] bytes)
Parameters
Type Name Description
Byte[] bytes

An array of 8-bit unsigned integers.

Returns
Type Description
String

The string representation, in base 64, of the contents of bytes.

| Improve this Doc View Source

FromBase64NoPad(String)

Converts the specified String, which encodes binary data as base 64 digits, to an equivalent 8-bit unsigned integer array.

Declaration
public static byte[] FromBase64NoPad(this string s)
Parameters
Type Name Description
String s

The base 64 string to convert.

Returns
Type Description
Byte[]

An array of 8-bit unsigned integers that is equivalent to s.

| Improve this Doc View Source

ToBase64NoPad(Byte[])

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits.

Declaration
public static string ToBase64NoPad(this byte[] bytes)
Parameters
Type Name Description
Byte[] bytes

An array of 8-bit unsigned integers.

Returns
Type Description
String

The string representation, in base 64, of the contents of bytes.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX