Class Curve
java.lang.Object
zmq.io.mechanism.curve.Curve
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbox(byte[] ciphertext, byte[] plaintext, int length, byte[] nonce, byte[] publicKey, byte[] secretKey) intbox(ByteBuffer ciphertext, ByteBuffer plaintext, int length, ByteBuffer nonce, byte[] publicKey, byte[] secretKey) byte[][]keypair()Generates a pair of keys for use with this class.String[]Generates a pair of Z85-encoded keys for use with this class.static Stringz85EncodePublic(byte[] publicKey)
-
Constructor Details
-
Curve
public Curve()
-
-
Method Details
-
z85EncodePublic
-
keypairZ85
Generates a pair of Z85-encoded keys for use with this class.- Returns:
- an array of 2 strings, holding Z85-encoded keys. The first element of the array is the public key, the second element is the private (or secret) key.
-
keypair
public byte[][] keypair()Generates a pair of keys for use with this class.- Returns:
- an array of 2 byte arrays, holding keys. The first element of the array is the public key, the second element is the private (or secret) key.
-
box
public int box(ByteBuffer ciphertext, ByteBuffer plaintext, int length, ByteBuffer nonce, byte[] publicKey, byte[] secretKey) -
box
public int box(byte[] ciphertext, byte[] plaintext, int length, byte[] nonce, byte[] publicKey, byte[] secretKey)
-