Skip to main content

Export Multiple Keys in C

Export Multiple Keys in C

The TEExportMultiKeys() function is used to export multiple keys. You need to login as a certificate user in order to export keys. You need to provide the system id, principal id and the  T-tags hidden links) when you call the TEExportMultiKeys() function. The returned keys are encrypted with the public key of the certificate user. You can use the certificate user's private key to decrypt the exported keys.


Code Samples

See the C environment settings for details on setting the project environment.


c_exportmultikeys.c

The complete source for this sample, together with its console output, is published in the SDK reference and is the maintained copy:

c_exportmultikeys.c

Output
Connected to localhost at 8888 as certificate user with /test_key.pfx.
sid = 1
pid = 5009
tekeybuffer[0].key.buffer (len = 128) :
[39] [14] [9d] [20] [cd] [2f] [ea] [64] [50] [aa] [1e] [7f] [b6] [e0] [ef] [52] [9c] [31] [50] [b7] [8a] [34] [8b] [99]
[2a] [7d] [ef] [42] [7b] [37] [5d] [95] [27] [f6] [60] [2a] [3c] [79] [ec] [c1] [b3] [53] [fb] [85] [ 0] [60] [b8] [e5]
[d5] [70] [ f] [98] [b5] [fd] [55] [b4] [93] [f4] [16] [6c] [bc] [d8] [f2] [47] [fe] [4e] [e5] [ a] [5f] [af] [3e] [aa]
[25] [a7] [60] [1b] [10] [ca] [df] [2d] [6d] [dd] [56] [91] [72] [61] [a4] [af] [ad] [ 9] [7b] [e5] [84] [76] [a4] [57]
[97] [e3] [c9] [ 8] [ 5] [37] [eb] [42] [cf] [bc] [d1] [69] [60] [c0] [96] [68] [f8] [54] [ 2] [15] [90] [70] [68] [e3]
[23] [4a] [d1] [b5] [f2] [d2] [c6] [94]
tekeybuffer[1].key.buffer (len = 128) :
[81] [d7] [f8] [55] [11] [48] [e6] [79] [4f] [c6] [9f] [ f] [ 1] [1a] [e1] [1a] [47] [cf] [47] [aa] [cf] [58] [c1] [64]
[db] [be] [92] [4d] [d1] [d3] [1b] [5f] [39] [e4] [1e] [2c] [42] [85] [75] [d9] [d5] [eb] [ 9] [3b] [e9] [2a] [45] [ee]
[f2] [ba] [cc] [ 2] [9b] [9e] [d2] [d0] [db] [e8] [be] [1f] [40] [c4] [ 8] [35] [ff] [ b] [21] [e1] [f3] [ba] [8e] [f3]
[57] [46] [ 5] [dc] [90] [6b] [91] [9b] [63] [1d] [cb] [bc] [ab] [f6] [f9] [7b] [e2] [48] [17] [eb] [6b] [bc] [70] [48]
[67] [79] [d4] [92] [52] [41] [ca] [af] [a0] [fe] [90] [8b] [3b] [80] [6d] [9e] [3b] [4b] [90] [c8] [5c] [42] [1c] [d3]
[7b] [cb] [2c] [ 5] [dd] [9a] [9d] [71]
tekeybuffer[2].key.buffer (len = 128) :
[1e] [e0] [44] [cf] [90] [ac] [8b] [29] [da] [4c] [2b] [e2] [6f] [10] [79] [da] [28] [b7] [7e] [56] [ a] [ef] [f0] [63]
[40] [b1] [5b] [ad] [ 2] [72] [cd] [6a] [70] [a7] [87] [6d] [66] [e1] [73] [58] [99] [dd] [15] [46] [78] [8f] [6f] [31]
[48] [ee] [88] [76] [4f] [c6] [23] [47] [e6] [28] [eb] [10] [f9] [66] [80] [73] [5f] [d9] [d3] [23] [56] [ 0] [39] [32]
[e5] [87] [6e] [f4] [cc] [b8] [a8] [e9] [1d] [59] [61] [7e] [f9] [ 9] [45] [ff] [30] [4a] [85] [92] [ 9] [ f] [3a] [d0]
[32] [56] [9c] [9a] [ec] [ad] [a1] [e8] [d9] [79] [74] [59] [65] [67] [57] [7e] [32] [6d] [eb] [be] [7f] [e6] [3e] [94]
[5f] [df] [10] [bd] [f5] [6e] [ b] [aa]
Disconnected from server