ownerSaltFromEntropy static method

List<int> ownerSaltFromEntropy(
  1. List<int> ownerEntropy,
  2. bool hasLotSeq
)

Extract owner salt from owner entropy based on lot and sequence numbers.

Given owner entropy and a boolean flag indicating whether lot and sequence numbers are used, this method extracts the owner salt accordingly.

  • ownerEntropy: The owner entropy containing owner salt.
  • hasLotSeq: A boolean flag indicating whether lot and sequence numbers are included in the owner entropy.
  • Returns: A List

Implementation

static List<int> ownerSaltFromEntropy(
    List<int> ownerEntropy, bool hasLotSeq) {
  return hasLotSeq
      ? List<int>.from(
          ownerEntropy.sublist(0, Bip38EcConst.ownerSaltWithLotSeqByteLen))
      : ownerEntropy;
}