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 Web3SecretStorageDefinationV3Exception("Invalid iv length.",
        details: {
          "excepted": _SecretStorageConst.ivLength,
          "length": iv.length
        });
  }
  return CryptoParam._(kdf: kdf, iv: iv);
}