Skip to content

Instantly share code, notes, and snippets.

@erdomke
erdomke / Base32.cs
Last active April 26, 2024 12:01 — forked from BravoTango86/Base32.cs
Base32 Encoding and Decoding in C#
/*
* Derived from https://github.com/google/google-authenticator-android/blob/master/AuthenticatorApp/src/main/java/com/google/android/apps/authenticator/Base32String.java
*
* Copyright (C) 2016 BravoTango86
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@erdomke
erdomke / aras_labs_combining_items_best_practice.cs
Last active December 1, 2017 03:27 — forked from EliJDonahue/aras_labs_combining_items_best_practice.cs
Demonstrates the Aras Best Practice of building a single AML statement instead of combining items with appendItem()
string myAml;
using (var writer = new System.IO.StringWriter())
using (var xml = System.Xml.XmlWriter.Create(writer, new System.Xml.XmlWriterSettings()
{
OmitXmlDeclaration = true
}))
{
xml.WriteStartElement("AML");
for (var i = 0; i < 10; i++)