Package org.cryptomator.cryptolib.common
Class P384KeyPair
- java.lang.Object
-
- org.cryptomator.cryptolib.common.ECKeyPair
-
- org.cryptomator.cryptolib.common.P384KeyPair
-
- All Implemented Interfaces:
Destroyable
public class P384KeyPair extends ECKeyPair
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static P384KeyPair
generate()
static P384KeyPair
load(InputStream in, char[] passphrase)
Loads a key pair from the given input streamstatic P384KeyPair
load(Path p12File, char[] passphrase)
Loads a key pair from the given filevoid
store(OutputStream out, char[] passphrase)
Stores this key in PKCS#12 format to the given output streamvoid
store(Path p12File, char[] passphrase)
Stores this key pair in PKCS#12 format at the given path-
Methods inherited from class org.cryptomator.cryptolib.common.ECKeyPair
destroy, equals, getPrivate, getPublic, hashCode, isDestroyed, keyPair
-
-
-
-
Method Detail
-
generate
public static P384KeyPair generate()
-
load
public static P384KeyPair load(Path p12File, char[] passphrase) throws IOException, Pkcs12PasswordException, Pkcs12Exception
Loads a key pair from the given file- Parameters:
p12File
- A .p12 filepassphrase
- The password to protect the key material- Returns:
- loaded key pair
- Throws:
IOException
- In case of I/O errorsPkcs12PasswordException
- If the supplied password is incorrectPkcs12Exception
- If any cryptographic operation fails
-
load
public static P384KeyPair load(InputStream in, char[] passphrase) throws IOException, Pkcs12PasswordException, Pkcs12Exception
Loads a key pair from the given input stream- Parameters:
in
- An input stream providing PKCS#12 formatted datapassphrase
- The password to protect the key material- Returns:
- loaded key pair
- Throws:
IOException
- In case of I/O errorsPkcs12PasswordException
- If the supplied password is incorrectPkcs12Exception
- If any cryptographic operation fails
-
store
public void store(Path p12File, char[] passphrase) throws IOException, Pkcs12Exception
Stores this key pair in PKCS#12 format at the given path- Parameters:
p12File
- The path of the .p12 filepassphrase
- The password to protect the key material- Throws:
IOException
- In case of I/O errorsPkcs12Exception
- If any cryptographic operation fails
-
store
public void store(OutputStream out, char[] passphrase) throws IOException, Pkcs12Exception
Stores this key in PKCS#12 format to the given output stream- Parameters:
out
- The output stream to which the data will be writtenpassphrase
- The password to protect the key material- Throws:
IOException
- In case of I/O errorsPkcs12Exception
- If any cryptographic operation fails
-
-