Interface CryptoProvider
public interface CryptoProvider
-
Method Summary
Modifier and TypeMethodDescriptioncom.liferay.portal.security.key.crypto.CryptoServiceResult<byte[]> voidcom.liferay.portal.security.key.crypto.CryptoServiceResult<byte[]> com.liferay.portal.security.key.crypto.CryptoServiceResult<Key> 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.CryptoKeygetCryptoKey(long companyId, String keyIdentifier) getKeyIdentifiers(long companyId) com.liferay.portal.security.key.crypto.CryptoServiceResult<String> importSecretKey(String algorithm, long companyId, byte[] keyBytes, String keyIdentifier) booleanisAllowedCompany(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[]>
-
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
-