org.polyglotted.crypto.asymmetric
Class RsaKeyReader
java.lang.Object
org.polyglotted.crypto.asymmetric.RsaKeyReader
public abstract class RsaKeyReader
- extends Object
RsaKeyReader is a utility used to read DER formatted private and public key files. To create the keys, you would use
the "openssl" commands. This is adapted from the blog entry at
http://codeartisan.blogspot.co.uk/2009/05/public-key-cryptography-in-java.html
- Author:
- Shankar Vasudevan
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RsaKeyReader
public RsaKeyReader()
readPrivateKey
public static PrivateKey readPrivateKey(InputStream is)
- Read the private key from the file
- Parameters:
is - the InputStream for the key file
- Returns:
- the PrivateKey
readPublicKey
public static PublicKey readPublicKey(InputStream is)
- Read the public key from the file
- Parameters:
is - the InputStream for the key file
- Returns:
- the PublicKey
Copyright © 2012-2013 Polyglotted Org. All Rights Reserved.