init(size:)
Generates a new random key of the given size.
Declaration
init(size: SymmetricKeySize)Parameters
- size:
The size of the key to generate. You can use one of the standard sizes, like Bits256, or you can create a key of custom length by initializing a Symmetrickeysize instance with a non-standard value.