     func testEncryptStringDecryptData() {
         // Given a string
         let string = "martin"
+        var encryptedString=""
         // If we encrypt it
         do {
-            let encryptedString = try CryptoHelperTests._cryptoHelper.encryptString(string)
+            encryptedString = try CryptoHelperTests._cryptoHelper.encryptString(string)
             // we get an encrypted base64 string
             XCTAssertEqual(encryptedString, "eTCPvyGC1XPax9XAwdBDdQ==")
+        } catch {
+            XCTFail("\(error)")
+        }
+
+        do {
+
             // Let's convert the encrypted base64 string to an encrypted buffer
-            if let encryptedData = NSData(base64EncodedString: encryptedString, options: [.IgnoreUnknownCharacters]) {
+            // if let encryptedData = NSData(base64EncodedString: encryptedString, options: [.IgnoreUnknownCharacters]) {
+            // BPDS > @md  No that's not correct !
+            if let encryptedData = encryptedString.dataUsingEncoding(Default.TEXT_ENCODING) {
                 // If we decrypt it
                 let decryptedData = try CryptoHelperTests._cryptoHelper.decryptData(encryptedData)
                 // And convert its content to a string

                // If we encrypt it
                let encryptedData = try CryptoHelperTests._cryptoHelper.encryptData(data)
                // we get an encrypted buffer
                XCTAssertEqual(encryptedData.base64EncodedStringWithOptions(.EncodingEndLineWithCarriageReturn), "FacTvJN9YQVRqzW8mCuy4w==")
                // If we decrypt it
                let decryptedData = try CryptoHelperTests._cryptoHelper.decryptData(encryptedData)
                // we get back our original buffer

                // Let's transform it to a string
                XCTAssertEqual(decryptedString, "martin")
            } else {
                XCTFail("Error during NSData encoding")
            }
        } catch {
            XCTFail("\(error)")
        }

    }

    func testEncryptDataDecrypString() {
