• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class HibcEncoder

Encodes and decodes HIBC (Health Industry Bar Code) data. HIBC LIC (Labeler Identification Code) and HIBC PAS (Provider Application Standard) use the same encoding format: a '+' prefix, the data, and a mod-43 check character. Ported from Zint's hibc() function (BSD-3-Clause).

Inheritance
object
HibcEncoder
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DRIT.Barcode.HIBC
Assembly: DRIT.Barcode.dll
Syntax
public static class HibcEncoder

Fields

CharacterSet

The permitted HIBC character set (same as Code 39 / TECHNETIUM in Zint).

Declaration
public const string CharacterSet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"
Field Value
Type Description
string

Prefix

The HIBC prefix character.

Declaration
public const char Prefix = '+'
Field Value
Type Description
char

Methods

Decode(string)

Validates and decodes an HIBC string (with '+' prefix and check character). Returns the raw data without the prefix and check character.

Declaration
public static string Decode(string hibcString)
Parameters
Type Name Description
string hibcString

The HIBC string with '+' prefix and check character.

Returns
Type Description
string

The raw data without prefix and check character.

Exceptions
Type Condition
BarcodeException

The string is not valid HIBC.

Encode(string)

Encodes HIBC data by prepending '+' and appending a mod-43 check character.

Declaration
public static string Encode(string data)
Parameters
Type Name Description
string data

The raw HIBC data (without prefix or check character).

Returns
Type Description
string

The processed HIBC string: '+' + data + check_char.

Exceptions
Type Condition
BarcodeException

The data contains invalid characters or is too long.

IsValid(string)

Tries to validate an HIBC string.

Declaration
public static bool IsValid(string hibcString)
Parameters
Type Name Description
string hibcString

The HIBC string to validate.

Returns
Type Description
bool

True if the string is valid HIBC.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX