NaCl Cryptography
This release includes full support for NaCl cryptography, including encryption and decryption using shared (generated from private and public key using Diffie-Hellman key exchange) and secret keys (for symmetric cryptography), as well as signatures, signature verification, and signature verification based on message.
We also added some helper methods, mixedToUint8Array(mixed, includeType = false, length = null)
and uint8ArrayToMixed(uint8Array, includeType = false)
, which convert between mixed (String
, Integer
, Array
, Uint8Array
, JSON/Object
) to Uint8Array
, optionally including the type which will automatically preserve in the conversion, and a length (padded if smaller than length, cut off if larger than type).