Package org.apache.hadoop.crypto.key
Class KeyProvider.Metadata
java.lang.Object
org.apache.hadoop.crypto.key.KeyProvider.Metadata
- Direct Known Subclasses:
KMSClientProvider.KMSMetadata
- Enclosing class:
- KeyProvider
Key metadata that is associated with the key.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intGet the algorithm from the cipher.intintprotected byte[]Serialize the metadata to a set of bytes.toString()
-
Constructor Details
-
Metadata
-
Metadata
Deserialize a new metadata object from a set of bytes.- Parameters:
bytes- the serialized metadata- Throws:
IOException- raised on errors performing I/O.
-
-
Method Details
-
toString
-
getDescription
-
getCreated
-
getCipher
-
getAttributes
-
getAlgorithm
Get the algorithm from the cipher.- Returns:
- the algorithm name
-
getBitLength
public int getBitLength() -
getVersions
public int getVersions() -
addVersion
protected int addVersion() -
serialize
Serialize the metadata to a set of bytes.- Returns:
- the serialized bytes
- Throws:
IOException- raised on errors performing I/O.
-