aesGcm method
A factory used by AesGcm
.
Implementation
@override
AesGcm aesGcm({
int secretKeyLength = 32,
int nonceLength = AesGcm.defaultNonceLength,
}) {
if (kIsWeb || nonceLength != AesGcm.defaultNonceLength) {
return super.aesGcm(
secretKeyLength: secretKeyLength,
nonceLength: nonceLength,
);
}
if (nonceLength == AesGcm.defaultNonceLength) {
final platformImpl = FlutterAesGcm(
secretKeyLength: secretKeyLength,
);
if (platformImpl.isSupportedPlatform) {
return platformImpl;
}
}
return BackgroundAesGcm(
secretKeyLength: secretKeyLength,
nonceLength: nonceLength,
);
}