Class MasterkeyHubAccess


  • public class MasterkeyHubAccess
    extends Object
    • 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 for
        encodedCiphertext - The encrypted masterkey
        encodedEphPubKey - 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