Class ArmoredEncryptingChannelFactory
java.lang.Object
com.exceptionfactory.jagged.framework.stream.StandardEncryptingChannelFactory
com.exceptionfactory.jagged.framework.armor.ArmoredEncryptingChannelFactory
- All Implemented Interfaces:
EncryptingChannelFactory
ASCII Armored implementation of Encrypting Channel Factory supports writing encrypted channels with Base64 wrapping
-
Constructor Summary
ConstructorsConstructorDescriptionArmored Encrypting Channel Factory constructor using default Security Provider configurationArmoredEncryptingChannelFactory(Provider provider) Armored 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 with ASCII Armored Base64 wrapping
-
Constructor Details
-
ArmoredEncryptingChannelFactory
public ArmoredEncryptingChannelFactory()Armored Encrypting Channel Factory constructor using default Security Provider configuration -
ArmoredEncryptingChannelFactory
Armored 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 with ASCII Armored Base64 wrapping- Specified by:
newEncryptingChannelin interfaceEncryptingChannelFactory- Overrides:
newEncryptingChannelin classStandardEncryptingChannelFactory- Parameters:
outputChannel- Output Channel destination for encrypted bytesrecipientStanzaWriters- One or more Recipient Stanza Writers for intended recipients- Returns:
- Writable Byte Channel with ASCII Armored Base64 wrapping
- Throws:
GeneralSecurityException- Thrown on recipient writing or cipher operation failuresIOException- Thrown on failures to write Channel or Recipient Stanzas
-