Home | History | Annotate | Download | only in BasicAndroidKeyStore
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3  Copyright 2013 The Android Open Source Project
      4 
      5  Licensed under the Apache License, Version 2.0 (the "License");
      6  you may not use this file except in compliance with the License.
      7  You may obtain a copy of the License at
      8 
      9      http://www.apache.org/licenses/LICENSE-2.0
     10 
     11  Unless required by applicable law or agreed to in writing, software
     12  distributed under the License is distributed on an "AS IS" BASIS,
     13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  See the License for the specific language governing permissions and
     15  limitations under the License.
     16 -->
     17 <sample>
     18     <name>BasicAndroidKeyStore</name>
     19     <group>Security</group>
     20     <package>com.example.android.basicandroidkeystore</package>
     21 
     22     <!-- change minSdk if needed-->
     23     <minSdk>18</minSdk>
     24 
     25     <strings>
     26         <intro>
     27 <![CDATA[
     28 Welcome to the <b>Basic Android Key Store</b> sample!\n\n
     29 This sample demonstrates how to use the Android Key Store to safely create and store
     30 encryption keys that only your application can access.  You can also sign data
     31 using those keys.\n\n
     32 To create a new KeyPair, click \"Create\".\n\n
     33 To sign some data using a KeyPair, click \"Sign\".\n\n
     34 To verify the data using the signature provided, click \"Verify\".\n\n
     35 ]]>
     36         </intro>
     37     </strings>
     38 
     39     <template src="base"/>
     40     <template src="SimpleView"/>
     41     <common src="activities"/>
     42     <common src="logger"/>
     43 
     44     <metadata>
     45     <status>PUBLISHED</status>
     46     <categories>Security</categories>
     47     <technologies>Android</technologies>
     48     <languages>Java</languages>
     49     <solutions>Mobile</solutions>
     50     <level>ADVANCED</level>
     51     <icon>screenshots/big-icon.png</icon>
     52     <screenshots>
     53         <img>screenshots/screenshot1.png</img>
     54         <img>screenshots/screenshot2.png</img>
     55         <img>screenshots/screenshot3.png</img>
     56         <img>screenshots/screenshot4.png</img>
     57         <img>screenshots/screenshot5.png</img>
     58     </screenshots>
     59     <api_refs>
     60         <android>android.security.KeyPairGeneratorSpec</android>
     61     </api_refs>
     62     <description>
     63 <![CDATA[
     64 An advanced sample displaying the creation and usage of data integrity mechanisms
     65 ]]>
     66     </description>
     67     <intro>
     68 <![CDATA[
     69 This sample demonstrates how to use the Android [KeyStore][1] to safely create and store
     70 encryption keys that only your application can access.
     71 
     72 A [KeyPair][2] consisting of a [PrivateKey][3] and a [PublicKey][4] is being generated.
     73 The private key then is being used to sign and verify a String.
     74 
     75 Next to that appropriate exception handling for potential errors is being displayed.
     76 
     77 [1]: https://developer.android.com/reference/java/security/KeyStore.html
     78 [2]: https://developer.android.com/reference/java/security/KeyPair.html
     79 [3]: https://developer.android.com/reference/java/security/PrivateKey.html
     80 [4]: https://developer.android.com/reference/java/security/PublicKey.html
     81 ]]>
     82     </intro>
     83 </metadata>
     84 </sample>
     85