readNativeAeadParams function

AeadParams readNativeAeadParams(
  1. NativeAeadParams aeadParams
)

Reads native AEAD parameters and returns an AeadParams instance.

This function extracts the tag length and nonce length from the given NativeAeadParams and creates an AeadParams object with these values.

  • Parameters:
    • aeadParams: The native AEAD parameters to read.
  • Returns: An AeadParams instance with the extracted tag and nonce lengths.

Implementation

AeadParams readNativeAeadParams(NativeAeadParams aeadParams) {
  int tagLength = aeadParams.tag_length;
  int nonceLength = aeadParams.nonce_length;

  return AeadParams(tagLength, nonceLength);
}