nextSigningGeneration method

int nextSigningGeneration(
  1. String enrollmentId,
  2. CryptographicMaterialAlgorithm algorithm
)

The generation fileSigningMaterial will use next for enrollmentId's algorithm — one past the highest already filed, or 1.

Implementation

int nextSigningGeneration(
        String enrollmentId, CryptographicMaterialAlgorithm algorithm) =>
    _nextGeneration(
        _enrollments[enrollmentId]?.materialsByKeyId.keys ?? const [],
        keyIdPrefix('sign', algorithm));