¡@

Home 

2014/10/15 ¤U¤È 10:13:00

iphone Programming Glossary: publictag

Iphone - How to encrypt NSData with public key and decrypt with private key?

http://stackoverflow.com/questions/10072124/iphone-how-to-encrypt-nsdata-with-public-key-and-decrypt-with-private-key

#import Security Security.h @interface ViewController UIViewController SecKeyRef publicKey SecKeyRef privateKey NSData publicTag NSData privateTag void encryptWithPublicKey uint8_t plainBuffer cipherBuffer uint8_t cipherBuffer void decryptWithPrivateKey.. dictionary. queryPublicKey setObject __bridge id kSecClassKey forKey __bridge id kSecClass queryPublicKey setObject publicTag forKey __bridge id kSecAttrApplicationTag queryPublicKey setObject __bridge id kSecAttrKeyTypeRSA forKey __bridge id kSecAttrKeyType.. viewWillAppear animated privateTag NSData alloc initWithBytes privateKeyIdentifier length sizeof privateKeyIdentifier publicTag NSData alloc initWithBytes publicKeyIdentifier length sizeof publicKeyIdentifier self testAsymmetricEncryptionAndDecryption..

RSA implementations in Objective C

http://stackoverflow.com/questions/10222524/rsa-implementations-in-objective-c

#import Security Security.h @interface ViewController UIViewController SecKeyRef publicKey SecKeyRef privateKey NSData publicTag NSData privateTag void encryptWithPublicKey uint8_t plainBuffer cipherBuffer uint8_t cipherBuffer void decryptWithPrivateKey.. dictionary. queryPublicKey setObject __bridge id kSecClassKey forKey __bridge id kSecClass queryPublicKey setObject publicTag forKey __bridge id kSecAttrApplicationTag queryPublicKey setObject __bridge id kSecAttrKeyTypeRSA forKey __bridge id kSecAttrKeyType.. viewWillAppear animated privateTag NSData alloc initWithBytes privateKeyIdentifier length sizeof privateKeyIdentifier publicTag NSData alloc initWithBytes publicKeyIdentifier length sizeof publicKeyIdentifier self testAsymmetricEncryptionAndDecryption..

Extracting a public key from key pair in key chain

http://stackoverflow.com/questions/11467215/extracting-a-public-key-from-key-pair-in-key-chain

publicKeyAttr NSMutableDictionary alloc init NSMutableDictionary keyPairAttr NSMutableDictionary alloc init NSData publicTag publicIdentifier dataUsingEncoding NSUTF8StringEncoding NSData privateTag privateIdentifier dataUsingEncoding NSUTF8StringEncoding.. publicKeyAttr setObject NSNumber numberWithBool YES forKey __bridge id kSecAttrIsPermanent publicKeyAttr setObject publicTag forKey __bridge id kSecAttrApplicationTag keyPairAttr setObject privateKeyAttr forKey __bridge id kSecPrivateKeyAttrs keyPairAttr.. noErr NSData publicKeyBits nil CFTypeRef pk NSMutableDictionary queryPublicKey NSMutableDictionary alloc init NSData publicTag publicKeyIdentifier dataUsingEncoding NSUTF8StringEncoding Set the public key query dictionary. queryPublicKey setObject..

How to Create SeckeyRef from exponent and modulus of Public key and use in SecKeyEncrypt method

http://stackoverflow.com/questions/11516355/how-to-create-seckeyref-from-exponent-and-modulus-of-public-key-and-use-in-secke

as public key iphone encryption rsa public key encryption share improve this question solved the problem NSData publicTag self PublicKeyItems in Generating keypair and calling the method try importing BasicEncodingRules.h and .m in your file..

Saving SecKeyRef device generated public/private key pair on disk

http://stackoverflow.com/questions/5988735/saving-seckeyref-device-generated-public-private-key-pair-on-disk

the public key query dictionary. queryPublicKey setObject id kSecClassKey forKey id kSecClass queryPublicKey setObject publicTag forKey id kSecAttrApplicationTag queryPublicKey setObject id kSecAttrKeyTypeRSA forKey id kSecAttrKeyType queryPublicKey..