Closed MarcelGarus closed 4 years ago
Hi,
Glad to hear that.
So, similar constructor would do, but should need some checks before apply.
EncryptedMessage.fromList({List<int> list})
: super.fromList(list, nonceLength /* nonceLength as min length */);
Hi 😄 I'm using your package and it's been fun so far. I'm doing a networking application, where
Uint8List
s are sent back and forth, containing data encrypted by yourSecretBox
. BecauseEncryptedMessage
extendsByteList
, which in turn implementsUint8List
, it's really easy to encrypt data and send it. On the other side though, some boilerplate is necessary to convert a receivedUint8List
to anEncryptedMessage
in order to decrypt it. That means, I manually have to do the following, which seems hacky because I need to know the underlying implementation details of theEncryptedMessage
:It would be really helpful if
EncryptedMessage
had a constructor that simply took aUint8List
.