Advanced Windows 8 Apps Using JavaScript Jump Start Exam Prep M5: Data, Files, and Encryption Michael Palermo Microsoft Technical Evangelist Jeremy Foster Microsoft Developer Evangelist
Jump Start Target Agenda Advanced Windows 8 Apps Using JavaScript Module 1: Background Tasks and Components Module 2: Hardware and Sensors Module 3: Printing and PlayTo MEAL BREAK Module 4: Animations, Custom Controls, and Globalization Module 5: Data, Files, and Encryption Module 6: Deployment
Module Agenda Design and implement data caching Save and retrieve files from the file system Secure application data ˃ ˃
Cached data local settings, local files, indexedDb, HTML local storage Caching Expensive data web service, database In-memory data page state, variables, objects, etc.
Azure Caching
Module Agenda Design and implement data caching Save and retrieve files from the file system Secure application data ˃ ˃
Storage options consist of… Application state session state User settings local settings, roaming settings Application data temporary files, local files, roaming files, other? User data document libraries
CODESHOW: STORAGE demo
Module Agenda Design and implement data caching Save and retrieve files from the file system Secure application data ˃ ˃
What Windows 8 can do to protect data… Create symmetric keys Perform symmetric encryption Create asymmetric keys Perform asymmetric encryption Derive password based keys Create message authentication codes (MACs) Hash content Digitally sign content Asynchronous protection of static data Asynchronous protection of a data stream Create a certificate Create a self-signed certificate Install a certificate response Import a certificate in PFX format Use smart card certificates and keys (sharedUserCertificates capabilities set) Use certificates from the user MY store (sharedUserCertificates capabilities set) Specify per application trusted root certificates Specify per application peer trusted certificates Explicitly disable inheritance from system trust Specify the certificate selection criteria
Cryptography namespaces Windows.Security.Cryptography Static class for encoding and decoding data, generating random numbers, and converting between byte arrays and buffers Windows.Security.Cryptography.Certificates Types you can use to create certificate requests and install certificate responses Windows.Security.Cryptography.Core Algorithms for encrypting, signing, and hashing data Windows.Security.Cryptography.DataProtection Encrypt or decrypt static data or a data stream *requires Enterprise Authentication capability and should only be used in enterprise scenarios
CODESHOW: CRYPTOGRAPHY AND ENCRYPTION demo
Summary Design and implement data caching Save and retrieve files from the file system Secure application data