further benchmarking stuff
This commit is contained in:
@@ -20,16 +20,16 @@ const SHA256Schema = z.discriminatedUnion("strategy", [
|
||||
}),
|
||||
]);
|
||||
|
||||
const Argon2idSchema = z.discriminatedUnion("strategy", [
|
||||
const Argon2Schema = z.discriminatedUnion("strategy", [
|
||||
z.object({
|
||||
algorithm: z.literal(ChallengeAlgorithm.Argon2id),
|
||||
algorithm: z.literal(ChallengeAlgorithm.Argon2),
|
||||
strategy: z.literal(ChallengeStrategy.LeadingZeroes),
|
||||
leading_zeroes: z.object({
|
||||
difficulty: z.number().int().min(1).max(64),
|
||||
}),
|
||||
}),
|
||||
z.object({
|
||||
algorithm: z.literal(ChallengeAlgorithm.Argon2id),
|
||||
algorithm: z.literal(ChallengeAlgorithm.Argon2),
|
||||
strategy: z.literal(ChallengeStrategy.TargetNumber),
|
||||
target_number: z.object({
|
||||
max_number: z.number().int().min(1).max(100_000),
|
||||
@@ -44,7 +44,7 @@ const KCTFSchema = z.object({
|
||||
}),
|
||||
});
|
||||
|
||||
export const Config = z.union([SHA256Schema, Argon2idSchema, KCTFSchema]);
|
||||
export const Config = z.union([SHA256Schema, Argon2Schema, KCTFSchema]);
|
||||
|
||||
export type Config = z.infer<typeof Config>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user