IOS Keychain fingerprint Identifies the difference between get and post requests

Source: Internet
Author: User
Tags key string
<span id="Label3"></p><p class="p1"><p class="p1"><strong><span class="s1">01- <span class="s2">Key String</span></span></strong></p></p><p class="p2"><p class="p2"><span class="s3">1. The <span class="s1">system-provided keychain function can save the password locally <span class="s3">, the <span class="s1">system uses <span class="s3">AES <span class="s1">to encrypt the password <span class="s3">A. <span class="s1">view <span class="s3"> <span class="s1">saved passwords <span class="s3"></span> in Safari </span></span></span></span></span></span></span></span></span></span></p></p><p class="p2"><p class="p2"><span class="s3">2. <span class="s1">use a third-party framework <span class="s3">Sskeychain <span class="s1">to save the password to the keychain and get the password in the keychain <span class="s3">A. <span class="s1">get all users <span class="s3"></span> in keychain</span> </span> </span> </span></span></span></p></p><p class="p3"><p class="p3"><span class="s1">[sskeychain allaccounts]<br>B. <span class="s4">save the password to the Keychain <span class="s1">service <span class="s4">can be used <span class="s1">Boundleid</span> </span> </span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">[sskeychain SetPassword:self.pwdView.text Forservice:kpwdchainkey account:self.nameView.text]; C. <span class="s4">get the password <span class="s1"></span> from the keychain</span></span></p></p><p class="p3"><p class="p3"><span class="s1">Self.pwdView.text = [sskeychain Passwordforservice:kpwdchainkey account:self.nameView.text];</span></p></p><p class="p4"><p class="p4"><strong><span class="s5">02- <span class="s1">fingerprint identification <span class="s6"></span> </span></span></strong></p></p><p class="p3"><p class="p3"><span class="s1">1. <span class="s4">fingerprint identification<span class="s1"><br>A. iphone5s <span class="s4">introduced fingerprint identification <span class="s1">, TouchID b. iOS8 <span class="s4">open the fingerprint Identification <span class="s1">SDK</span> </span> </span> </span></span></span></span></p></p><p class="p2"><p class="p2"><span class="s3">2. <span class="s1">use <span class="s3"></span> of fingerprint identification</span></span></p></p> <ol class="ol1"> <ol class="ol1"> <li class="li5"><span class="s1"><span class="s4">Import Header File <span class="s1"><br>#import <LocalAuthentication/LocalAuthentication.h><br></span></span></span></li> <li class="li6"><span class="s1"><span class="s4">Determine if the device supports fingerprint identification <span class="s1"><br>Lacontext *ctx = [[lacontext alloc] init];<br></span></span></span></li> </ol> </ol><p class="p3"><p class="p3"><span class="s1"><span class="s4">determine if fingerprint recognition is supported<span class="s1"><br>If ([ctx canevaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics error:null]) {</span></span></span></p></p><p class="p3"><p class="p3"><span class="s1">NSLog (@ " <span class="s4">support <span class="s1">");</span> </span></span></p></p><p class="p2"><p class="p2"><span class="s3"><span class="s1">fingerprint identification <span class="s3"></span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">[ctx evaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics localizedreason:@ " <span class="s4">fingerprint verification <span class="s1">" Reply: ^ (BOOL success, nserror *error) {</span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">NSLog (@ "= =%d===%@", success,error); If (success) {</span></p></p><p class="p2"><p class="p2"><span class="s3"><span class="s1">after the fingerprint verification <span class="s3">is successful, <span class="s1">request the server to pay or log in <span class="s3">}</span> </span> </span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">}]; }else{</span></p></p><p class="p3"><p class="p3"><span class="s1">NSLog (@ " <span class="s4">not supported <span class="s1">");}</span> </span></span></p></p><p class="p2"><p class="p2"><span class="s3">3. <span class="s1">only <span class="s3">iOS8 <span class="s1">after the fingerprint identification of the <span class="s3">api// <span class="s1">determine whether the device is a <span class="s3">iOS8 <span class="s1">system <span class="s3"></span> </span> </span> </span> </span> </span> </span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">If ([uidevice Currentdevice].systemversion.floatvalue < 8) {</span></p></p><p class="p3"><p class="p3"><span class="s1">Return }</span></p></p><p class="p2"><p class="p2"><span class="s3">4. <span class="s1">Errors <span class="s3"></span> in fingerprint identification</span></span></p></p><p class="p2"><p class="p2"><span class="s3"><span class="s1">fingerprint not recognized <span class="s3"></span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">laerrorauthenticationfailed = klaerrorauthenticationfailed,// <span class="s4">user clicked the Cancel button <span class="s1"></span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">laerrorusercancel// <span class="s4">User clicked the Enter Password button <span class="s1"></span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">laerroruserfallback// <span class="s4">System canceled <span class="s1">, <span class="s4">other <span class="s1"></span> apps activated</span> </span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">= klaerrorusercancel, = klaerroruserfallback,</span></p></p><p class="p3"><p class="p3"><span class="s1">laerrorsystemcancel// <span class="s4">authentication does not start <span class="s1">, <span class="s4">no password <span class="s1"></span> is set on the device</span> </span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">= klaerrorsystemcancel,</span></p></p><p class="p3"><p class="p3"><span class="s1">Laerrorpasscodenotset = klaerrorpasscodenotset,// <span class="s4">authentication cannot start <span class="s1">, <span class="s4">no <span class="s1">Touch ID</span> on device</span> </span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">Laerrortouchidnotavailable = klaerrortouchidnotavailable,// <span class="s4">verification failed <span class="s1">to start, <span class="s4">no fingerprint <span class="s1"></span> entered</span> </span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">laerrortouchidnotenrolled = klaerrortouchidnotenrolled,</span></p></p><p class="p1"><p class="p1"><strong><span class="s1">The. GET <span class="s2"> <span class="s1">vs. <span class="s2">POST <span class="s1"></span> comparison</span> </span> </span></span></strong></p></p><p class="p2"><p class="p2"><span class="s5">A. GET<span class="s6"><br><span class="s3">I. Get <span class="s1">is generally to get the data <span class="s3"></span> on the server</span></span></span></span></p></p><p class="p2"><p class="p2"><span class="s3">The GET <span class="s1">method is <span class="s3"> <span class="s1">to pass the data through <span class="s3">the url, <span class="s1">high efficiency <span class="s3">iii. the <span class="s1">requested data is <span class="s3"> <span class="s1"> <span class="s3"> <span class="s1">not secure <span class="s3"></span> </span> </span> on</span> the URL</span> </span> </span> </span> </span> </span> </span> </span></span></p></p><p class="p3"><p class="p3"><span class="s1">1) login.php?username=zs&pwd=123456</span></p></p><p class="p2"><p class="p2"><span class="s3">2) <span class="s1">If there is a Chinese and a special symbol <span class="s3">(? = &, etc.) in the parameters, <span class="s1"> <span class="s3"> <span class="s1"> <span class="s3">URL <span class="s1">encoding IV should be performed <span class="s3">. <span class="s1">The result of a GET request can be <span class="s3"></span> cached by the browser</span> </span> </span> </span> </span> </span> </span> </span> </span></span></p></p><p class="p2"><p class="p2"><span class="s5">B. POST<span class="s6"><br><span class="s3">I. POST <span class="s1">typically submits data <span class="s3">to <span class="s1">the server and gets the results <span class="s3"></span> returned by the server</span> </span> </span></span></span></span></p></p><p class="p2"><p class="p2"><span class="s3">Ii. POST <span class="s1">is the transfer of data through the request body <span class="s3">, <span class="s1">low efficiency <span class="s3">Iii. <span class="s1">the requested data is not visible to the user <span class="s3">and is <span class="s1">relatively secure <span class="s3"></span> </span> </span> </span> </span> </span> </span> </span></span></p></p><p class="p2"><p class="p2"><span class="s3">Iv. POST <span class="s1">requests cannot be <span class="s3"></span> cached by the browser</span></span></p></p><p><p>IOS Keychain fingerprint Identifies the difference between get and post requests</p></p></span>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.