NRFUTIL constructor
NRFUTIL({
- NRFUtilMode mode = NRFUtilMode.release,
- int hardwareVersion = 0xFFFFFFFF,
- int applicationVersion = 0xFFFFFFFF,
- int bootloaderVersion = 0xFFFFFFFF,
- SoftDeviceTypes softDeviceReqType = SoftDeviceTypes.s132NRF52d611,
- List<
ValidationType> bootValidationTypeArray = const [ValidationType.validateSHA256], - Signing? signer,
- String? applicationFirmware,
- String? bootloaderFirmware,
- String? softDeviceFirmware,
- String? keyFile,
- String? comment,
Implementation
NRFUTIL({
this.mode = NRFUtilMode.release,
this.hardwareVersion = 0xFFFFFFFF,
this.applicationVersion = 0xFFFFFFFF,
this.bootloaderVersion = 0xFFFFFFFF,
this.softDeviceReqType = SoftDeviceTypes.s132NRF52d611,
//this.softDeviceIdTypes = const [SoftDeviceTypes.s132NRF52d611],
this.bootValidationTypeArray = const [ValidationType.validateSHA256],
Signing? signer,
this.applicationFirmware,
this.bootloaderFirmware,
this.softDeviceFirmware,
this.keyFile,
// this.manufacturerId = 0,
// this.imageType = 0,
this.comment,
}){
sofDeviceReq = sdTypeInt[softDeviceReqType.index];
if(signer == null){
if(keyFile != null){
String keyString = keyFile!;
this.signer = Signing(privateKey: keyString);
if(keyString == this.signer.defaultKey){
logger?.verbose("Warning your key file is compromised, please generate a new key for signing!");
}
}
else{
this.signer = Signing();
logger?.verbose("Warning you are using a default key which is compromised!");
}
}
else{
this.signer = signer;
}
}