Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the type def of generateKey() in DH class? #14

Open
pourang opened this issue Oct 27, 2016 · 3 comments
Open

What is the type def of generateKey() in DH class? #14

pourang opened this issue Oct 27, 2016 · 3 comments

Comments

@pourang
Copy link

pourang commented Oct 27, 2016

Hi,

What is the content of NSData that is returned by generateKey() in DH class?
How can I convert it (Public Key) to X509 in order to be used by Java consumer?

Best Regards,
P

@Ashok28
Copy link

Ashok28 commented Nov 2, 2016

Would like to see answer for this too.

@pkarc
Copy link
Contributor

pkarc commented Oct 10, 2017

Hope is not too late to reply, as the documentation says at https://opensource.apple.com/source/CommonCrypto/CommonCrypto-60027/Source/CommonCryptoSPI/CommonDH.h

It returns a byte string

/*!
    @function   CCDHGenerateKey
    @abstract   Generate the public key for use in a Diffie-Hellman handshake. 
                This value is returned as a byte string.

    @param      ref  The Diffie-Hellman context.
    @result	returns -1 on failure.                 
*/

@soyersoyer
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants