Class CertificateBasedCryptographyAlgorithm
- java.lang.Object
-
- com.fifa.connectservicebus.sdk.encryption.CertificateBasedCryptographyAlgorithm
-
- All Implemented Interfaces:
CryptographyAlgorithm
public class CertificateBasedCryptographyAlgorithm extends Object implements CryptographyAlgorithm
-
-
Constructor Summary
Constructors Constructor Description CertificateBasedCryptographyAlgorithm(CertificateBasedCryptographyService cryptographyService, Logger logger)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decrypt(Message message)Decrypts dataEncryptionResultencrypt(byte[] data, String queueIdentifier)Encrypts content for given queueStringgetCipherMode()Returns Cipher Modestatic StringgetEncryptionInitializationVectorKey()Returns getEncryptionInitializationVectorKey value that is returned in together with encrypted contentstatic StringgetEncryptionKey()Returns EncryptionKey value that is returned in together with encrypted contentintgetKeySize()Returns key size used by algorithmStringgetPadding()Returns type of padding used by algorithmintgetVersion()Returns version of algorithm
-
-
-
Constructor Detail
-
CertificateBasedCryptographyAlgorithm
public CertificateBasedCryptographyAlgorithm(CertificateBasedCryptographyService cryptographyService, Logger logger)
-
-
Method Detail
-
getVersion
public int getVersion()
Returns version of algorithm- Specified by:
getVersionin interfaceCryptographyAlgorithm
-
getKeySize
public int getKeySize()
Returns key size used by algorithm
-
getCipherMode
public String getCipherMode()
Returns Cipher Mode
-
getPadding
public String getPadding()
Returns type of padding used by algorithm
-
getEncryptionKey
public static String getEncryptionKey()
Returns EncryptionKey value that is returned in together with encrypted content
-
getEncryptionInitializationVectorKey
public static String getEncryptionInitializationVectorKey()
Returns getEncryptionInitializationVectorKey value that is returned in together with encrypted content
-
encrypt
public EncryptionResult encrypt(byte[] data, String queueIdentifier) throws CryptographyException, PublicCertificateNotFoundException
Encrypts content for given queue- Specified by:
encryptin interfaceCryptographyAlgorithm- Parameters:
data- Data for encryption.queueIdentifier- Identifier of queue.- Returns:
- Encrypted content
- Throws:
CryptographyExceptionPublicCertificateNotFoundException
-
decrypt
public byte[] decrypt(Message message) throws CryptographyException
Decrypts data- Specified by:
decryptin interfaceCryptographyAlgorithm- Parameters:
message- Service Bus message with encrypted content- Returns:
- Throws:
CryptographyException
-
-