Class StandardEncryptingChannelFactory
java.lang.Object
com.exceptionfactory.jagged.framework.stream.StandardEncryptingChannelFactory
- All Implemented Interfaces:
EncryptingChannelFactory
- Direct Known Subclasses:
ArmoredEncryptingChannelFactory
Standard implementation of Encrypting Channel Factory supports writing encrypted channels
-
Constructor Summary
ConstructorsConstructorDescriptionStandard Encrypting Channel Factory constructor using default Security Provider configurationStandardEncryptingChannelFactory(Provider provider) Standard Encrypting Channel Factory constructor using specified Security Provider -
Method Summary
Modifier and TypeMethodDescriptionnewEncryptingChannel(WritableByteChannel outputChannel, Iterable<RecipientStanzaWriter> recipientStanzaWriters) Create new channel that encrypts and writes to the supplied output channel
-
Constructor Details
-
StandardEncryptingChannelFactory
public StandardEncryptingChannelFactory()Standard Encrypting Channel Factory constructor using default Security Provider configuration -
StandardEncryptingChannelFactory
Standard Encrypting Channel Factory constructor using specified Security Provider- Parameters:
provider- Security Provider supporting ChaCha20-Poly1305
-
-
Method Details
-
newEncryptingChannel
public WritableByteChannel newEncryptingChannel(WritableByteChannel outputChannel, Iterable<RecipientStanzaWriter> recipientStanzaWriters) throws GeneralSecurityException, IOException Create new channel that encrypts and writes to the supplied output channel- Specified by:
newEncryptingChannelin interfaceEncryptingChannelFactory- Parameters:
outputChannel- Output Channel destination for encrypted bytesrecipientStanzaWriters- One or more Recipient Stanza Writers for intended recipients- Returns:
- Writable Byte Channel
- Throws:
GeneralSecurityException- Thrown on recipient writing or cipher operation failuresIOException- Thrown on failures to write Channel or Recipient Stanzas
-