我正在制作一个网络应用程序, 它需要存储用户的电子邮件和密码, 用于网络服务, 然后连接到网络服务。 与其每次输入, 不如每次输入, 我希望当应用程序关闭时保存它 。
我该怎么做呢?我需要用核心数据还是SQLite 做两个字符串,还是有另一个更好的方法?
谢谢
我正在制作一个网络应用程序, 它需要存储用户的电子邮件和密码, 用于网络服务, 然后连接到网络服务。 与其每次输入, 不如每次输入, 我希望当应用程序关闭时保存它 。
我该怎么做呢?我需要用核心数据还是SQLite 做两个字符串,还是有另一个更好的方法?
谢谢
不要将密码存储为纯文本 。 即使它应该是“ 无关紧要”和“ 不安全” 。 如果可能的话, 也考虑不将其全部存储( 例如, shore hash ), 或者先从网络服务处获取饼干 。 在这种情况下, < code> NSUIDR Defaults 将是存储这些数据的标准和简易方式 。
如果您需要保存密码, 系统键链是安全的地方 。 查找 < code> SecKeyclanceAddGenericPassword code> API 函数, 它将导致您找到 < a href=> https:// developler. appl. com/ library/mac/ # documentation/security/ conceptual/ keycleckets/ keynessConcepts/ 03tasks/ tasks. html" rel=" no folpol" > Keynage Services 指南 a > 和示例 。
创建 nsobject Global 类 -- --
全球.h
#import <Foundation/Foundation.h>
@interface Global : NSObject
extern NSString *gStrEmail;
extern NSString *gStrPassword;
@ end
全球m.m
#import "全球.h"
@implementation Global
NSString *gStrEmail=@"";
NSString *gStrPassword=@"";
@ end
import this class in to App_Prefix.pch
#import "全球.h"
用户对帐日志( V) 主计长. m
gStrEmail=txtEmail.text;
gStrPassword==txtEmail.text;
和密码字符串
I m using Xcode on OSX to develop command line C applications. I would also like to use Instruments to profile and find memory leaks. However, I couldn t find a way to display the console when ...
i recently switched to mac. first and foremost i installed xampp. then for django-python-mysql connectivity, i "somehow" ended up installing a seperate MySQL. now the seperate mysql installation is ...
This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...
I m trying to control windows of a foreign OSX applications from my application. I d like to 1. move the windows on the screen 2. resize the windows on the screen 3. change the currently active window ...
My current JDK on Mac OS (10.6) is set to 1.6 and I d like to switch to 1.5. A listing of /System/Library/Frameworks/JavaVM.framework/Versions/ shows: lrwxr-xr-x 1 root wheel 10 Nov 3 18:34 ...
I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...
The problem I am trying to solve is quite simple. When I open the lid of my MacBook I like to have the Dock on the left side of the screen, but when I get home and connect my MacBook to my Cinema ...
A question for Apple,QT programmers. Would like to know if it s possible to export a Movie object to MP3 using the QuickTime API. Preferably the ConvertMovieToFile function. I ve looked at ...