ricmoo / GMEllipticCurveCrypto

Elliptic Curve Cryptography library for iOS (ECDSA and ECDH)
BSD 2-Clause "Simplified" License
122 stars 46 forks source link

Don't create sharedSecretForPublicKey #25

Open jerry770311 opened 5 years ago

jerry770311 commented 5 years ago

This is my EC publicKey: cardOrganization.publicKey = [[NSData alloc]initWithBase64EncodedString:@"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEYktbLuAv0v52erE5LPscomKaOmQsvevxzOyn9k4sF1hqpBc5kUygzxA9Jl0R/2dTuk8ka7UCujk36xeUsLVpWA==" options:0 ] (bytes length:91) NSData *sharedSecretKey = [privateCrypto sharedSecretForPublicKey:cardOrganization.publicKey];