Skip to content

Instantly share code, notes, and snippets.

@robherley
Created September 20, 2018 15:30
Show Gist options
  • Save robherley/c926b81f34e38736dbb7c87db7b9c5d2 to your computer and use it in GitHub Desktop.
Save robherley/c926b81f34e38736dbb7c87db7b9c5d2 to your computer and use it in GitHub Desktop.
const { execSync } = require('child_process');
const modes = ['ECB', 'CBC', 'OFB', 'PCBC'];
const stuff = [
{
type: 'DES',
sizes: ['56'],
modes
},
{
type: 'TripleDES',
sizes: ['112'],
modes
},
{
type: 'RC2',
sizes: ['40', '1024'],
modes: ['ECB']
},
{
type: 'AES',
sizes: ['128', '256'],
modes
},
{
type: 'Blowfish',
sizes: ['32', '448'],
modes
}
];
for (let { type, sizes, modes } of stuff) {
for (let size of sizes) {
for (let mode of modes) {
console.log(`=====${type} ${size} ${mode}=====`);
execSync(
`java SymmetricKeyTest ${type} ${size} ${mode} 100001 "hello world"`,
{
stdio: [null, process.stdout, process.stderr]
}
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment