Interface CryptoProvider


public interface CryptoProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    com.liferay.portal.security.key.crypto.CryptoServiceResult<byte[]>
    decrypt(byte[] ciphertext, long companyId, String keyIdentifier)
     
    void
    deleteKey(long companyId, String keyIdentifier)
     
    com.liferay.portal.security.key.crypto.CryptoServiceResult<byte[]>
    encrypt(long companyId, String keyIdentifier, byte[] plaintext)
     
    com.liferay.portal.security.key.crypto.CryptoServiceResult<Key>
    exportKey(long companyId, String keyIdentifier)
     
    com.liferay.portal.security.key.crypto.CryptoServiceResult<String>
    generateAsymmetricKeyIdentifier(String algorithm, long companyId, String keyIdentifier)
     
    com.liferay.portal.security.key.crypto.CryptoServiceResult<String>
    generateSecretKeyIdentifier(String algorithm, long companyId, String keyIdentifier)
     
    com.liferay.portal.security.key.crypto.CryptoKey
    getCryptoKey(long companyId, String keyIdentifier)
     
    getKeyIdentifiers(long companyId)
     
     
    com.liferay.portal.security.key.crypto.CryptoServiceResult<String>
    importSecretKey(String algorithm, long companyId, byte[] keyBytes, String keyIdentifier)
     
    boolean
    isAllowedCompany(long companyId)
     
    com.liferay.portal.security.key.crypto.CryptoServiceResult<String>
    unwrap(long companyId, String keyIdentifier, String masterKeyIdentifier, String wrappedKeyAlgorithm, byte[] wrappedKeyBytes, int wrappedKeyCipherType)
     
    com.liferay.portal.security.key.crypto.CryptoServiceResult<byte[]>
    wrap(long companyId, String keyIdentifier, String masterKeyIdentifier)
     
  • Method Details

    • decrypt

      com.liferay.portal.security.key.crypto.CryptoServiceResult<byte[]> decrypt(byte[] ciphertext, long companyId, String keyIdentifier) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • deleteKey

      void deleteKey(long companyId, String keyIdentifier) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • encrypt

      com.liferay.portal.security.key.crypto.CryptoServiceResult<byte[]> encrypt(long companyId, String keyIdentifier, byte[] plaintext) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • exportKey

      com.liferay.portal.security.key.crypto.CryptoServiceResult<Key> exportKey(long companyId, String keyIdentifier) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • generateAsymmetricKeyIdentifier

      com.liferay.portal.security.key.crypto.CryptoServiceResult<String> generateAsymmetricKeyIdentifier(String algorithm, long companyId, String keyIdentifier) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • generateSecretKeyIdentifier

      com.liferay.portal.security.key.crypto.CryptoServiceResult<String> generateSecretKeyIdentifier(String algorithm, long companyId, String keyIdentifier) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • getCryptoKey

      com.liferay.portal.security.key.crypto.CryptoKey getCryptoKey(long companyId, String keyIdentifier) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • getKeyIdentifiers

      List<String> getKeyIdentifiers(long companyId) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • getProviderStatus

      ProviderStatus getProviderStatus()
    • importSecretKey

      com.liferay.portal.security.key.crypto.CryptoServiceResult<String> importSecretKey(String algorithm, long companyId, byte[] keyBytes, String keyIdentifier) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • isAllowedCompany

      boolean isAllowedCompany(long companyId)
    • unwrap

      com.liferay.portal.security.key.crypto.CryptoServiceResult<String> unwrap(long companyId, String keyIdentifier, String masterKeyIdentifier, String wrappedKeyAlgorithm, byte[] wrappedKeyBytes, int wrappedKeyCipherType) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException
    • wrap

      com.liferay.portal.security.key.crypto.CryptoServiceResult<byte[]> wrap(long companyId, String keyIdentifier, String masterKeyIdentifier) throws com.liferay.portal.security.key.crypto.exception.CryptoException
      Throws:
      com.liferay.portal.security.key.crypto.exception.CryptoException