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