Methods
# decrypt(cipherText, plainTextopt) → {PlainText|void}
Decrypts a CipherText and stores the result in the destination parameter.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cipherText |
CipherText
|
CipherText to decrypt | |
plainText |
PlainText
|
<optional> |
PlainText destination to store the decrypted result |
Returns undefined if a PlainText was specified. Otherwise returns a
PlainText containng the decrypted result
PlainText
|
void
# delete()
Delete the underlying WASM instance.
Should be called before dereferencing this object to prevent the
WASM heap from growing indefinitely.
# invariantNoiseBudget(cipherText) → {number}
Computes the invariant noise budget (in bits) of a CipherText. The invariant
noise budget measures the amount of room there is for the noise to grow while
ensuring correct decryptions. This function works only with the BFV scheme.
Parameters:
Name | Type | Description |
---|---|---|
cipherText |
CipherText
|
CipherText to measure |
Invariant noise budget (in bits)
number