     private func _hash(inout hash:[Char], var _ number:Int, _ alphabet:[Char])
     {
         let length = alphabet.count, index = hash.count;
-        do {
+        repeat {
             hash.insert(alphabet[number % length], atIndex: index);
             number = number / length;
         } while( number != 0 );

            
            if(newSepsLength > sepsLength)
            {
                let diff = advance(self.alphabet.startIndex, newSepsLength - sepsLength);
                let range = 0..<diff;
                self.seps += self.alphabet[range];
                self.alphabet.removeRange(range);
            } else
            {
                let pos = advance(self.seps.startIndex,newSepsLength);
                self.seps.removeRange(pos+1..<self.seps.count);
            }
        }
        
        shuffle(&self.alphabet, self.salt);
        
        let guard = Int(ceil(Double(alphabetLength)/HashidsOptions.GUARD_DIV));
        if(alphabetLength < 3)
        {
            let seps_guard = advance(self.seps.startIndex,guard);
            let range = 0..<seps_guard;
            self.guards += self.seps[range];
            self.seps.removeRange(range);
        } else
        {
            let alphabet_guard = advance(self.alphabet.startIndex,guard);
            let range = 0..<alphabet_guard;
            self.guards += self.alphabet[range];
            self.alphabet.removeRange(range);


// MARK: Internal functions

internal func contains<T:CollectionType where T.Generator.Element:Equatable>(a:T, _ e:T.Generator.Element) -> Bool
{
    return (a.indexOf(e) != nil);
}

internal func transform<T:CollectionType where T.Generator.Element:Equatable>(a: T, _ b: T, _ cmpr: (inout Array<T.Generator.Element>, T, T, T.Generator.Element ) -> Void ) -> [T.Generator.Element]
{
    typealias U = T.Generator.Element;
    var c = [U]();
