Refactored random byte generation functions.
This commit is contained in:
@@ -12,7 +12,7 @@ proc createHeartbeat*(ctx: AgentCtx): Heartbeat =
|
||||
size: 0'u32,
|
||||
agentId: string.toUuid(ctx.agentId),
|
||||
seqNr: 0'u32,
|
||||
iv: generateIV(),
|
||||
iv: generateBytes(Iv),
|
||||
gmac: default(AuthenticationTag)
|
||||
),
|
||||
listenerId: string.toUuid(ctx.listenerId),
|
||||
|
||||
@@ -203,7 +203,7 @@ proc collectAgentMetadata*(ctx: AgentCtx): AgentRegistrationData =
|
||||
size: 0'u32,
|
||||
agentId: string.toUuid(ctx.agentId),
|
||||
seqNr: nextSequence(string.toUuid(ctx.agentId)),
|
||||
iv: generateIV(),
|
||||
iv: generateBytes(Iv),
|
||||
gmac: default(AuthenticationTag)
|
||||
),
|
||||
agentPublicKey: ctx.agentPublicKey,
|
||||
|
||||
@@ -11,7 +11,7 @@ proc createTaskResult*(task: Task, status: StatusType, resultType: ResultType, r
|
||||
size: 0'u32,
|
||||
agentId: task.header.agentId,
|
||||
seqNr: nextSequence(task.header.agentId),
|
||||
iv: generateIV(),
|
||||
iv: generateBytes(Iv),
|
||||
gmac: default(array[16, byte])
|
||||
),
|
||||
taskId: task.taskId,
|
||||
|
||||
Reference in New Issue
Block a user