public static class JCryptoBox.Unseal extends Object
JCryptoBox.unsealing(KeyPair),
JCryptoBox.Seal| Modifier and Type | Method and Description |
|---|---|
byte[] |
unseal(byte[] sealedBox)
Decrypts the given sealed box and returns the plaintext message.
|
byte[] |
unseal(byte[] sealedBox,
int offset,
int length)
Decrypts the given sealed box slice and returns the plaintext message.
|
void |
unseal(byte[] input,
int inOffset,
int inLength,
byte[] output,
int outOffset)
Decrypts the sealed box slice of input data and writes the plaintext message to the provided output array at
the given offset.
|
public void unseal(byte[] input,
int inOffset,
int inLength,
byte[] output,
int outOffset)
input - array of bytes to read sealed box data to decryptinOffset - where in the input array to begin reading data to decryptinLength - length of the sealed box in bytes (includes encoded public key and authentication tag)output - array of bytes to write decrypted message tooutOffset - where in the output array to begin writing decrypted dataIllegalArgumentException - if the sealed box cannot be successfully decrypted or if the output
buffer is too smallArrayIndexOutOfBoundsException - if the offsets or length are out of range of their arraysNullPointerException - if the input or output arrays are nullpublic byte[] unseal(byte[] sealedBox,
int offset,
int length)
sealedBox - array of bytes to read sealed box data to decryptoffset - where in the array to begin reading data to decryptlength - length of the sealed box in bytes (includes encoded public key and authentication tag)IllegalArgumentException - if the sealed box cannot be successfully decryptedArrayIndexOutOfBoundsException - if the offset or length are out of range for the given arrayNullPointerException - if the given array is nullpublic byte[] unseal(byte[] sealedBox)
sealedBox - array of bytes containing sealed box dataIllegalArgumentException - if the sealed box cannot be successfully decryptedNullPointerException - if the given array is nullCopyright © 2021. All rights reserved.