Package org.acemq.amqp.crypto
Class EncryptionKey
java.lang.Object
org.acemq.amqp.crypto.EncryptionKey
A key and the name messages will refer to it by.
The identifier is the part that makes rotation possible. It travels in every message, so a message written last month can still be read by a service whose current key is a different one, without anybody having to know when the change happened.
Identifiers are public. They sit in the clear in front of the ciphertext
where anyone holding the message can read them, which is the point — the reader has to know
what to ask the key store for before it can decrypt anything. Name them for the key, not for
what they protect: orders-2026-09 rather than customer-card-numbers.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EncryptionKey
- Parameters:
id- what messages written with this key will name, in ASCIIkey- an AES key; 256-bit unless there is a reason
-
-
Method Details
-
id
- Returns:
- the identifier written into every message this key encrypts
-
key
- Returns:
- the key itself
-
equals
-
hashCode
public int hashCode() -
toString
-