Käynnissä

118 Java public key algorithm

I have a Java class that handles the verification of authentication details on a website, which contains the following three lines: X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(pubKey_bytearray) KeyFactory keyFactory = [url removed, login to view]("DSA", "SUN") PublicKey pubKey = [url removed, login to view](pubKeySpec) The method in which these are the first three lines takes three parameters - the public key as a byte array, the signature data and the verify data. The public key I have is a 444-byte non-ASCII file. I want to create an implementation of this algorithm in PHP, to be used in the application I'm developing. However the public key is not in a format that I seem to be able to use with OpenSSL. What I need is a complete example of how to convert the public key I do have (which works with the Java method above, when read into a byte array and passed to the method) into a public key that can be fed into OpenSSL. Currently I get this error when trying to load the key using OpenSSL: [prompt]$ openssl x509 -in [url removed, login to view] unable to load certificate I'm happy to create the PHP implementation, but I need a public key that OpenSSL can understand. Any Java gurus know what I'm on about? [note: semicolons removed from the Java code shown above because scriptlance doesn't allow them]

Taidot: kaikki käy, Java

Näytä lisää: what algorithm, website gurus, java gurus, use algorithm, algorithm works, example algorithm, developing algorithm, data algorithm, application algorithm, algorithm is, algorithm example, get java, public works, openssl, key code verification, java algorithm, implementation algorithm, gurus, dsa, byte, algorithm, algorithm java, algorithm c

About the Employer:
( 4 reviews ) London, United Kingdom

Projektin tunnus: #1750986