GMEllipticCurveCrypto
GMEllipticCurveCrypto copied to clipboard
Don't create sharedSecretForPublicKey
This is my EC publicKey: cardOrganization.publicKey = [[NSData alloc]initWithBase64EncodedString:@"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEYktbLuAv0v52erE5LPscomKaOmQsvevxzOyn9k4sF1hqpBc5kUygzxA9Jl0R/2dTuk8ka7UCujk36xeUsLVpWA==" options:0 ] (bytes length:91) NSData *sharedSecretKey = [privateCrypto sharedSecretForPublicKey:cardOrganization.publicKey];
- (NSData*)sharedSecretForPublicKey: (NSData*)otherPublicKey {
if ([otherPublicKey length] != _bytes + 1) {
[NSException raise:@"Invalid Key" format:@"Public key %@ is invalid", otherPublicKey];<< run this crash
}
}
help!