Interface PayloadKeyWriter

All Known Implementing Classes:
StandardPayloadKeyWriter

public interface PayloadKeyWriter
Abstraction responsible for writing File Header and returning a Payload Key from a generated File Key
  • Method Details

    • writeFileHeader

      CipherKey writeFileHeader(ByteBuffer buffer, Iterable<RecipientStanzaWriter> recipientStanzaWriters) throws GeneralSecurityException, IOException
      Write File Header to buffer after generating a File Key and return derived Payload Key
      Parameters:
      buffer - Byte Buffer with sufficient capacity for serialized File Header should support at least 128 bytes
      recipientStanzaWriters - Recipient Stanza Writers
      Returns:
      Derived Payload Cipher Key for encryption operations
      Throws:
      GeneralSecurityException - Thrown on cipher operation failures
      IOException - Thrown on serialization failures