Skip to content

Instantly share code, notes, and snippets.

@jhyland87
Created June 21, 2017 18:52
Show Gist options
  • Save jhyland87/894134d581b76bd53e0ec2e969b849f9 to your computer and use it in GitHub Desktop.
Save jhyland87/894134d581b76bd53e0ec2e969b849f9 to your computer and use it in GitHub Desktop.
**
*
* Examples:
* ~$% : aes-128-cbc
* ~$%#@ : aes-128-cbc-hmac-sha256
* ! : aes128
* ~ : INVALID (no cipher named just 'aes')
*/
exports.cipherMap = {
'~' : {
'type' : 'aes',
'2' : {
'$' : {
'type' : '128',
'3' : {
'%' : {
'type' : 'cbc',
'4' : {
'#' : {
'type' : 'hmac',
'5' : {
'!' : 'sha1',
'@' : 'sha256'
}
}
}
},
'$' : 'ccm',
'#' : 'cfb',
'@' : 'cfb1',
'!' : 'cfb8',
'&' : 'ctr',
'*' : 'ecb',
'?' : 'gcm',
'~' : 'ofb',
'=' : 'xts'
}
},
'$' : {
'type' : '192',
'3' : {
'%' : 'cbc',
'$' : 'ccm',
'#' : 'cfb',
'@' : 'cfb1',
'!' : 'cfb8',
'&' : 'ctr',
'*' : 'ecb',
'?' : 'gcm',
'~' : 'ofb'
}
},
'$' : {
'type' : '256',
'3' : {
'%' : {
'type' : 'cbc',
'4' : {
'#' : {
'type' : 'hmac',
'5' : {
'!' : 'sha1',
'@' : 'sha256'
}
}
},
'$' : 'ccm',
'#' : 'cfb',
'@' : 'cfb1',
'!' : 'cfb8',
'&' : 'ctr',
'*' : 'ecb',
'?' : 'gcm',
'~' : 'ofb'
}
}
},
'type' : '128',
'3' : {
'type' : 'cbc',
'4' : {
'type' : 'hmac',
'5' : {
'type' : 'sha1'
}
}
}
}
},
'!' : 'aes128',
'@' : 'aes192',
'#' : 'aes256'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment