diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-07-30 21:42:47 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-07-30 22:03:49 +0200 |
commit | 8111ca2f9fd89772581c1ec8c0ee8005269f59ff (patch) | |
tree | d01a93336c6f150e3efde797f021ad9f74f62ed1 /src/node_crypto_groups.h | |
parent | 71b3138925fd19d23ae1d2e7223590239d0eebb0 (diff) | |
download | node-new-8111ca2f9fd89772581c1ec8c0ee8005269f59ff.tar.gz |
src: const-ify variables in src/node_crypto*
No functional changes, just some code tightening. Clean up some style
inconsistencies while we are here.
Diffstat (limited to 'src/node_crypto_groups.h')
-rw-r--r-- | src/node_crypto_groups.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/node_crypto_groups.h b/src/node_crypto_groups.h index 4a521f45a5..5e8d0d516f 100644 --- a/src/node_crypto_groups.h +++ b/src/node_crypto_groups.h @@ -7,9 +7,9 @@ */ -unsigned char two_generator[] = { 2 }; +const char two_generator[] = { 2 }; -unsigned char group_modp1[] = { +const char group_modp1[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34, 0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1, 0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, @@ -21,7 +21,7 @@ unsigned char group_modp1[] = { 0xf4, 0x4c, 0x42, 0xe9, 0xa6, 0x3a, 0x36, 0x20, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -unsigned char group_modp2[] = { +const char group_modp2[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34, 0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1, 0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, @@ -36,7 +36,7 @@ unsigned char group_modp2[] = { 0x1f, 0xe6, 0x49, 0x28, 0x66, 0x51, 0xec, 0xe6, 0x53, 0x81, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -unsigned char group_modp5[] = { +const char group_modp5[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34, 0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1, 0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, @@ -58,7 +58,7 @@ unsigned char group_modp5[] = { 0xca, 0x23, 0x73, 0x27, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -unsigned char group_modp14[] = { +const char group_modp14[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34, 0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1, 0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, @@ -86,7 +86,7 @@ unsigned char group_modp14[] = { 0x15, 0x72, 0x8e, 0x5a, 0x8a, 0xac, 0xaa, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -unsigned char group_modp15[] = { +const char group_modp15[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34, 0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1, 0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, @@ -127,7 +127,7 @@ unsigned char group_modp15[] = { 0xd1, 0x20, 0xa9, 0x3a, 0xd2, 0xca, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -unsigned char group_modp16[] = { +const char group_modp16[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34, 0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1, 0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, @@ -181,7 +181,7 @@ unsigned char group_modp16[] = { 0x34, 0x06, 0x31, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -unsigned char group_modp17[] = { +const char group_modp17[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34, 0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1, 0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, @@ -260,7 +260,7 @@ unsigned char group_modp17[] = { 0x74, 0xd6, 0xe6, 0x94, 0xf9, 0x1e, 0x6d, 0xcc, 0x40, 0x24, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -unsigned char group_modp18[] = { +const char group_modp18[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34, 0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1, 0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, @@ -367,9 +367,9 @@ unsigned char group_modp18[] = { typedef struct { const char* name; - unsigned char* prime; + const char* prime; int prime_size; - unsigned char* gen; + const char* gen; int gen_size; } modp_group; @@ -383,4 +383,4 @@ modp_group modp_groups[] = { { "modp17", group_modp17, sizeof(group_modp17) / sizeof(group_modp17[0]), two_generator, 1 }, { "modp18", group_modp18, sizeof(group_modp18) / sizeof(group_modp18[0]), two_generator, 1 }, { NULL, NULL, 0, NULL, 0 } -};
\ No newline at end of file +}; |