SecureKey constructor

SecureKey(
  1. Sodium sodium,
  2. int length
)

Allocates a new SecureKey of length bytes.

Convenience factory constructor that redirects to Sodium.secureAlloc and calls it with length on sodium.

Implementation

factory SecureKey(Sodium sodium, int length) => sodium.secureAlloc(length);