Giter Club home page Giter Club logo

joniks / ios-certificate--key--and-trust-sample-project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mufc-michael/ios-certificate--key--and-trust-sample-project

0.0 2.0 0.0 829 KB

This project derives content heavily from iOS Certificate, Key, and Trust Programming guide. It's primary purpose is to give the user the ability to quickly import/export RSA private keys from the keychain to the console.

Home Page: https://www.kuapay.com

ios-certificate--key--and-trust-sample-project's Introduction

This iOS 4.3 project was created in Xcode 4.  The most important class in this project is "Crypto".  It contains the following functions in its public interface:

These functions are slightly modified (fixing typos) from functions given in Apple's Certificate, Key, and Trust Programming Guide:

+(void)generateKeyPairWithPublicTag:(NSString *)publicTagString privateTag:(NSString *)privateTagString;

The following methods are designed to import PEM formatted RSA keys from strings and place in your keychain (slightly modified from these wonderful resources: http://blog.wingsofhermes.org/?p=42 and http://blog.wingsofhermes.org/?p=75):

+(void)setPrivateKey:(NSString *)pemPrivateKeyString tag:(NSString *)tag;
+(void)setPublicKey:(NSString *)pemPublicKeyString tag:(NSString *)tag;

// These methods are here to export RSA keys from keychain to strings in PEM format (Also taken from http://blog.wingsofhermes.org/?p=42 and http://blog.wingsofhermes.org/?p=75):

+(NSString *)getX509FormattedPublicKey:(NSString *)tag;
+(NSString *)getPEMFormattedPrivateKey:(NSString *)tag;

// Method to remove key from keychain:

+(void)removeKey:(NSString *)tag;

// See ViewController viewDidLoad method for example usage

ios-certificate--key--and-trust-sample-project's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.