Skip to content

Commit 1feabfc

Browse files
committed
fix examples
1 parent 29952f3 commit 1feabfc

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

examples/example_algorithm/config.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[meta]
22
id="ANY"
33
version="1.0.0"
4-
signature="f51f7b694f62d9bb1c6ece9dd8a85790"
4+
signature="a36d008f81060928709a6704da61bbd6"
55

66
[source]
77
columns = [
@@ -31,10 +31,6 @@ reference = []
3131
[algorithm.hash]
3232
strategy = "SHA256"
3333

34-
[algorithm.salt]
35-
source = "STRING"
36-
value = "{{ some_random_salt_value }}"
37-
3834
[destination]
3935
columns = [
4036
{ name = "Common Identifier", alias = "hashed_id" },

examples/file_based_usage.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ const OUTPUT_PATH = join(__dirname, 'output', 'output_10.csv');
1313
const VALIDATION_ERRORS_PATH = join(__dirname, 'output', 'validation_errors.csv');
1414

1515
// load configuration from file
16-
const configLoadResult = loadConfig({ configPath: CONFIG_PATH, algorithmId: ALGORITHM_ID });
16+
const configLoadResult = loadConfig({
17+
configPath: CONFIG_PATH,
18+
algorithmId: ALGORITHM_ID,
19+
validateConfig: true,
20+
embeddedSalt: { source: "STRING", value: "SOME_SALT_VALUE" }
21+
});
1722
if (!configLoadResult.success) throw new Error(`ERROR: Unable to load configuration file >> ${configLoadResult.error}`);
1823

1924
// validate the input file against all configured validation rules.

examples/programmatic_usage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ const config: Config.CoreConfiguration = {
3232
},
3333
algorithm: {
3434
hash: { strategy: "SHA256" },
35-
salt: { source: "STRING", value: "testSalt" },
35+
// NOTE: For procedural use, only salt values with source: "STRING" are permitted
36+
salt: { source: "STRING", value: "SOME_VALUE" },
3637
columns: {
3738
process: [],
3839
reference: [],

0 commit comments

Comments
 (0)