Show / Hide Table of Contents

Class ByteArrayBase64Converters

This static class exposes methods that efficiently encode binary data as Base64 byte arrays and converts such byte arrays into binary data in the form of a new byte array or binary data written into a disk file.

Inheritance
System.Object
ByteArrayBase64Converters
Namespace: WizardWrx.Core
Assembly: WizardWrx.Core.dll
Syntax
public static class ByteArrayBase64Converters : object

Methods

| Improve this Doc View Source

Base64DecodeByteArray(Byte[])

Decode a byte array that represents a set of Base64 encoded characters, returning a new byte array containing their decoded representation.

Declaration
public static byte[] Base64DecodeByteArray(byte[] pabytBase64Characters)
Parameters
Type Name Description
System.Byte[] pabytBase64Characters

Pass in a reference to the array of Base64 encoded bytes to be decoded and returned.

Returns
Type Description
System.Byte[]

The return value is the byte array containing the Base64 decoded bytes. Expect an array containing 3/4 as many elements as the input.

| Improve this Doc View Source

Base64DecodeByteArray2File(String, Byte[])

Decode byte array pabytBase64Characters and write the decoded bytes into file pstrFileName.

Declaration
public static void Base64DecodeByteArray2File(string pstrFileName, byte[] pabytBase64Characters)
Parameters
Type Name Description
System.String pstrFileName

Specify the name (absolute or relative to the current working directory) of the file into which to write the decoded bytes represented by pabytBase64Characters.

System.Byte[] pabytBase64Characters

Pass in a reference to the array of Base64 encoded bytes to be decoded and saved into file pstrFileName.

| Improve this Doc View Source

Base64EncodeBinaryFile(String)

Read an input file into a byte array of Base64 encoded characters that represents its contents in a form that can be included in a MIME encoded email message.

Declaration
public static byte[] Base64EncodeBinaryFile(string pstrInputFileName)
Parameters
Type Name Description
System.String pstrInputFileName

Pass in the absolute or relative (to the Current Working Directory) name of the file to read and encode into a byte array that represents the Base64 encoded characters.

Returns
Type Description
System.Byte[]

The return value is a byte array that contains 4 characters for each three bytes read from the input file.

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