CryptoParam constructor

CryptoParam({
  1. required KDFParam kdf,
  2. required List<int> iv,
})

Implementation

factory CryptoParam({required KDFParam kdf, required List<int> iv}) {
  if (iv.length != _SecretStorageConst.ivLength) {
    throw ArgumentException.invalidOperationArguments(
      "CryptoParam",
      name: "iv",
      reason: "Invalid iv bytes length.",
    );
  }
  return CryptoParam._(kdf: kdf, iv: iv);
}