static fun forKey(key: Key): AES256GCM
(source)
Pre-compute the expansion for the key.
Note that the returned instance of AES256GCM should be closed using #close()
(or try-with-resources) to ensure timely release of the expanded key, which is held in native memory.
key
- The key to precompute an expansion for.
UnsupportedOperationException
- If AES256-GSM support is not available.
Return
A AES256GCM instance.