Class SecretBox

java.lang.Object
xbr.network.crypto.SecretBox

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

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

    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 Details

    • SecretBox

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

    • 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)