Class ConfidentialityNone
java.lang.Object
org.metricshub.ipmi.core.coding.security.ConfidentialityAlgorithm
org.metricshub.ipmi.core.coding.security.ConfidentialityNone
Class representing no confidentiality algorithm.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
decrypt
(byte[] data) Decrypts the data.byte[]
encrypt
(byte[] data) Encrypts the data.byte
getCode()
Returns the algorithm's ID.int
getConfidentialityOverheadSize
(int payloadSize) Calculates size of the confidentiality header and trailer specific for the algorithm.Methods inherited from class org.metricshub.ipmi.core.coding.security.ConfidentialityAlgorithm
initialize
-
Constructor Details
-
ConfidentialityNone
public ConfidentialityNone()
-
-
Method Details
-
getCode
public byte getCode()Description copied from class:ConfidentialityAlgorithm
Returns the algorithm's ID.- Specified by:
getCode
in classConfidentialityAlgorithm
-
encrypt
public byte[] encrypt(byte[] data) Description copied from class:ConfidentialityAlgorithm
Encrypts the data.- Specified by:
encrypt
in classConfidentialityAlgorithm
- Parameters:
data
- - payload to be encrypted- Returns:
- encrypted data encapsulated in COnfidentiality Header and Trailer.
-
decrypt
public byte[] decrypt(byte[] data) Description copied from class:ConfidentialityAlgorithm
Decrypts the data.- Specified by:
decrypt
in classConfidentialityAlgorithm
- Parameters:
data
- - encrypted data encapsulated in COnfidentiality Header and Trailer.- Returns:
- decrypted data.
-
getConfidentialityOverheadSize
public int getConfidentialityOverheadSize(int payloadSize) Description copied from class:ConfidentialityAlgorithm
Calculates size of the confidentiality header and trailer specific for the algorithm.- Specified by:
getConfidentialityOverheadSize
in classConfidentialityAlgorithm
- Parameters:
payloadSize
- - size of the data that will be encrypted
-