 }
 
 public enum Base64Padding {
-    case on, off
+    /** Add padding character if necessary. */
+    case on
+    
+    /** Omit the final padding step, once encoding is complete. */
+    case off
 }
 
 public enum Base64Error: Error {
-    case containsIllegalCharacters, codingError
+    /** Thrown when the input string contains characters not allowed for the given coding case. */
+    case containsIllegalCharacters
+    
+    /** When alphabet handling fails. */
+    case codingError
 }
 
 /** Provides base-64 en-/decoding for the standard and url safe alphabet.

 When decoding .urlSafe encoded strings padding characters are ignored.
 */
public struct Base64 {
    public static func decode(_ string: String, coding: Base64Coding = .standard) throws -> Data? {
        if string.isEmpty { return nil }
        


/** Base64Coding provides alphabet handling and base functionality
 to proof that the string is a valid base64 encoded string via
 `validityRegEX` (Regular expression tested on [RegExr](http://regexr.com/)).
 */
public enum Base64Coding {
    /** The default when encoding/decoding(iOS compatible) */
    case standard

    /** to be used when dealing with URI */
    case urlSafe
    
    var alphabet: [UInt8] {
        switch self {
