tuweni / org.apache.tuweni.crypto.sodium / AES256GCM / forKey

forKey

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.

Parameters

key - Key!: The key to precompute an expansion for.

Exceptions

UnsupportedOperationException - If AES256-GSM support is not available.

Return
AES256GCM!: A AES256GCM instance.