/extern/spongycastle/pkix/src/main/java/org/spongycastle/operator/OutputEncryptor.java

https://gitlab.com/vizilo/fdroidclient · Java · 36 lines · 9 code · 5 blank · 22 comment · 0 complexity · 1d169cffc0e6d2d08cf87e5fb551817e MD5 · raw file

  1. package org.spongycastle.operator;
  2. import java.io.OutputStream;
  3. import org.spongycastle.asn1.x509.AlgorithmIdentifier;
  4. /**
  5. * General interface for an operator that is able to produce
  6. * an OutputStream that will output encrypted data.
  7. */
  8. public interface OutputEncryptor
  9. {
  10. /**
  11. * Return the algorithm identifier describing the encryption
  12. * algorithm and parameters this encryptor uses.
  13. *
  14. * @return algorithm oid and parameters.
  15. */
  16. AlgorithmIdentifier getAlgorithmIdentifier();
  17. /**
  18. * Wrap the passed in output stream encOut, returning an output stream
  19. * that encrypts anything passed in before sending on to encOut.
  20. *
  21. * @param encOut output stream for encrypted output.
  22. * @return an encrypting OutputStream
  23. */
  24. OutputStream getOutputStream(OutputStream encOut);
  25. /**
  26. * Return the key used for encrypting the output.
  27. *
  28. * @return the encryption key.
  29. */
  30. GenericKey getKey();
  31. }