Package com.tccc.kos.commons.util
Class PrivateKeyReader
java.lang.Object
com.tccc.kos.commons.util.PrivateKeyReader
Reader to load a private key stored in PKCS8 format.
- Version:
- 2022-06-24
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn a private key contained in the specified file.Return a private key accessible via the input stream.fromResource
(String resource) Return a private key contained in the specified resource.
-
Constructor Details
-
PrivateKeyReader
public PrivateKeyReader()
-
-
Method Details
-
fromFile
Return a private key contained in the specified file.- Parameters:
keyFile
- the file containing the key- Returns:
- the private key
- Throws:
IOException
-
fromResource
Return a private key contained in the specified resource.- Parameters:
resource
- the resource containing the key- Returns:
- the private key
- Throws:
IOException
-
fromInputStream
Return a private key accessible via the input stream.- Parameters:
is
- the stream containing the key- Returns:
- the private key
- Throws:
IOException
-