tuweni / org.apache.tuweni.devp2p.v5.encrypt / AES128GCM / encrypt

encrypt

fun encrypt(privateKey: Bytes, nonce: Bytes, message: Bytes, additionalAuthenticatedData: Bytes): Bytes (source)

AES128GCM encryption function

Parameters

key - 16-byte encryption key

nonce - initialization vector

message - content for encryption

data - encryption metadata