This commit is contained in:
@@ -32,6 +32,7 @@ test('toString and fromString are inverses', async () => {
|
||||
const box = (await asymmetric.PrivateBox.encrypt<Uint8Array>(pub, data)).expect("Should encrypt the data")
|
||||
const str = box.toString()
|
||||
const box2 = asymmetric.PrivateBox.fromString<Uint8Array>(str).expect("Should parse the string")
|
||||
expect(box).toEqual(box2)
|
||||
const plain = (await box2.decrypt(priv)).expect("Should decrypt the data")
|
||||
|
||||
expect(plain).toEqual(data)
|
||||
|
||||
Reference in New Issue
Block a user