Class KeyProvider.Metadata

java.lang.Object
org.apache.hadoop.crypto.key.KeyProvider.Metadata
Direct Known Subclasses:
KMSClientProvider.KMSMetadata
Enclosing class:
KeyProvider

public static class KeyProvider.Metadata extends Object
Key metadata that is associated with the key.
  • Constructor Details

    • Metadata

      protected Metadata(String cipher, int bitLength, String description, Map<String,String> attributes, Date created, int versions)
    • Metadata

      protected Metadata(byte[] bytes) throws IOException
      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

      public String toString()
      Overrides:
      toString in class Object
    • getDescription

      public String getDescription()
    • getCreated

      public Date getCreated()
    • getCipher

      public String getCipher()
    • getAttributes

      public Map<String,String> getAttributes()
    • getAlgorithm

      public String getAlgorithm()
      Get the algorithm from the cipher.
      Returns:
      the algorithm name
    • getBitLength

      public int getBitLength()
    • getVersions

      public int getVersions()
    • addVersion

      protected int addVersion()
    • serialize

      protected byte[] serialize() throws IOException
      Serialize the metadata to a set of bytes.
      Returns:
      the serialized bytes
      Throws:
      IOException - raised on errors performing I/O.