Package org.cryptomator.cryptolib.common
Class MasterkeyHubAccess
- java.lang.Object
-
- org.cryptomator.cryptolib.common.MasterkeyHubAccess
-
public class MasterkeyHubAccess extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Masterkey
decryptMasterkey(ECPrivateKey devicePrivateKey, String encodedCiphertext, String encodedEphPubKey)
Decrypts a masterkey retrieved from Cryptomator Hub
-
-
-
Method Detail
-
decryptMasterkey
public static Masterkey decryptMasterkey(ECPrivateKey devicePrivateKey, String encodedCiphertext, String encodedEphPubKey) throws MasterkeyLoadingFailedException
Decrypts a masterkey retrieved from Cryptomator Hub- Parameters:
devicePrivateKey
- Private key of the device this ciphertext is intended forencodedCiphertext
- The encrypted masterkeyencodedEphPubKey
- The ephemeral public key to be used to derive a secret shared between message sender and this device- Returns:
- The decrypted masterkey
- Throws:
MasterkeyLoadingFailedException
- If the parameters don't match and decryption fails
-
-