Package xbr.network

Class SecretBox


  • public class SecretBox
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      SecretBox​(byte[] key)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] decrypt​(byte[] ciphertext)  
      byte[] decrypt​(byte[] nonce, byte[] ciphertext)  
      byte[] encrypt​(byte[] message)  
      byte[] encrypt​(byte[] nonce, byte[] message)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SecretBox

        public SecretBox​(byte[] key)
    • Method Detail

      • encrypt

        public byte[] encrypt​(byte[] message)
      • encrypt

        public byte[] encrypt​(byte[] nonce,
                              byte[] message)
      • decrypt

        public byte[] decrypt​(byte[] ciphertext)
      • decrypt

        public byte[] decrypt​(byte[] nonce,
                              byte[] ciphertext)