Class JweCryptoProviderImpl

    • Constructor Detail

      • JweCryptoProviderImpl

        public JweCryptoProviderImpl​(String cryptoProviderId,
                                     int keyLength,
                                     int hashIterations,
                                     String skfAlgorithm)
    • Method Detail

      • encryptData

        public Optional<EncryptedData> encryptData​(byte[] data,
                                                   String password)
        Description copied from interface: CryptoProvider
        Encrypts data with some crypto algorithm using password
        Specified by:
        encryptData in interface CryptoProvider
        Parameters:
        data - Raw data for encryption
        password - Secret key to encrypt the data with
        Returns:
        encrypted data
      • decryptData

        public Optional<DecryptedData> decryptData​(byte[] data,
                                                   String password)
        Description copied from interface: CryptoProvider
        Decrypts data with some crypto algorithm using password
        Specified by:
        decryptData in interface CryptoProvider
        Parameters:
        data - Encrypted data for decryption
        password - Secret key to decrypt the data with
        Returns:
        Raw data