      - returns: A string
      */
     public func decryptString(string: String) throws ->String {
-       if let data=NSData(base64EncodedString: string, options: [.IgnoreUnknownCharacters]) {
-            let decrypted=try decryptData(data)
-            if let decryptedString=String(data: decrypted, encoding:Default.TEXT_ENCODING) {
-                return decryptedString
-            } else {
-                throw CryptoError.CodingError(message: "UTF8 string encoding error")
-            }
-
-
+        if let data=string.dataUsingEncoding(NSUTF8StringEncoding,allowLossyConversion:false){
+                let decrypted=try decryptData(data)
+                if let decryptedString=String(data: decrypted,encoding:NSUTF8StringEncoding){
+                    return decryptedString
+                }
+            
         }
-        throw CryptoError.CodingError(message: "Base 64 decoding has failed")
+            throw CryptoError.DecryptBase64Failure
+        
     }
 
     /**

        case KeyIsInvalid
        case ErrorWithStatusCode(cryptStatus:Int)
        case CodingError(message:String)
    }



     - returns: An encrypted buffer
     */
    public func encryptData(data: NSData) throws ->NSData {
        let crypted=try self._encryptOperation(CCOperation(kCCEncrypt),on: data)
        // (!) IMPORTANT
        // the crypted data may produces invalid UTF8 data producing nil Strings
        // We need to base64 encode any NSData.
        let b64Data=crypted.base64EncodedDataWithOptions(.EncodingEndLineWithCarriageReturn)
        return b64Data
    }

    /**
