Skip to content

Commit 65692ff

Browse files
committed
Update documentation
1 parent 6753811 commit 65692ff

File tree

10 files changed

+71
-4
lines changed

10 files changed

+71
-4
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ library. We currently support the following `Configurations` and `MachineCodeCom
102102
103103
| MachineCodeComputer | Description |
104104
| ------------------------------- | ----------------------------------------------- |
105-
| `MachineCodeComputer_static` | Does not automatically compute a machine code, instead the machine code is set by calling a function |
105+
| `MachineCodeComputer_COM` | Works on Windows and computes a machine code using functionallity provided through COM. |
106+
| `MachineCodeComputer_static` | Does not automatically compute a machine code, instead the machine code is set by calling `set_machine_code()`. |
107+
| `MachineCodeComputer_SystemdDBusInodes_SHA256` | Works on Linux systems and computes a machine code based on information provided by Systemd, DBus and the filesystem. |
106108
107109
The next step is to create and set up a handle class responsible for making requests
108110
to the Cryptolens Web API.
@@ -117,6 +119,7 @@ Cryptolens cryptolens_handle(e);
117119
cryptolens_handle.signature_verifier.set_modulus_base64(e, "ABCDEFGHI1234");
118120
cryptolens_handle.signature_verifier.set_exponent_base64(e, "ABCD");
119121
122+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
120123
cryptolens_handle.machine_code_computer.set_machine_code(e, "289jf2afs3");
121124
```
122125

examples/VisualStudio/Example_Activate/Example_Activate.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#include <cryptolens/MachineCodeComputer_static.hpp>
77

88
namespace cryptolens = ::cryptolens_io::v20190401;
9+
10+
// Set up an alias for the handler class used to interact with the library. This configuration checks the expiry date
11+
// on the license. Use Configuration_Windows_IgnoreExpires to ignore the expiry date.
12+
//
13+
// For this example we use MachineCodeComputer_static where the machine code is set using set_machine_code(). Other
14+
// ways of computing the machine code are available, see README.md.
915
using Cryptolens = cryptolens::basic_Cryptolens<cryptolens::Configuration_Windows<cryptolens::MachineCodeComputer_static>>;
1016

1117
/*
@@ -18,10 +24,11 @@ int main()
1824
Cryptolens cryptolens_handle(e);
1925

2026
// Setting up the signature verifier with credentials from "Security Settings"
21-
// on serialkeymanager.com
27+
// on cryptolens.io
2228
cryptolens_handle.signature_verifier.set_modulus_base64(e, "khbyu3/vAEBHi339fTuo2nUaQgSTBj0jvpt5xnLTTF35FLkGI+5Z3wiKfnvQiCLf+5s4r8JB/Uic/i6/iNjPMILlFeE0N6XZ+2pkgwRkfMOcx6eoewypTPUoPpzuAINJxJRpHym3V6ZJZ1UfYvzRcQBD/lBeAYrvhpCwukQMkGushKsOS6U+d+2C9ZNeP+U+uwuv/xu8YBCBAgGb8YdNojcGzM4SbCtwvJ0fuOfmCWZvUoiumfE4x7rAhp1pa9OEbUe0a5HL+1v7+JLBgkNZ7Z2biiHaM6za7GjHCXU8rojatEQER+MpgDuQV3ZPx8RKRdiJgPnz9ApBHFYDHLDzDw==");
2329
cryptolens_handle.signature_verifier.set_exponent_base64(e, "AQAB");
2430

31+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
2532
cryptolens_handle.machine_code_computer.set_machine_code(e, "289jf2afs3");
2633

2734
cryptolens::optional<cryptolens::LicenseKey> license_key =

examples/VisualStudio/Example_External/Example_External.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#include <cryptolens/MachineCodeComputer_static.hpp>
77

88
namespace cryptolens = ::cryptolens_io::v20190401;
9+
10+
// Set up an alias for the handler class used to interact with the library. This configuration checks the expiry date
11+
// on the license. Use Configuration_Windows_IgnoreExpires to ignore the expiry date.
12+
//
13+
// For this example we use MachineCodeComputer_static where the machine code is set using set_machine_code(). Other
14+
// ways of computing the machine code are available, see README.md.
915
using Cryptolens = cryptolens::basic_Cryptolens<cryptolens::Configuration_Windows<cryptolens::MachineCodeComputer_static>>;
1016

1117
/*
@@ -23,6 +29,7 @@ int main()
2329
cryptolens_handle.signature_verifier.set_modulus_base64(e, "khbyu3/vAEBHi339fTuo2nUaQgSTBj0jvpt5xnLTTF35FLkGI+5Z3wiKfnvQiCLf+5s4r8JB/Uic/i6/iNjPMILlFeE0N6XZ+2pkgwRkfMOcx6eoewypTPUoPpzuAINJxJRpHym3V6ZJZ1UfYvzRcQBD/lBeAYrvhpCwukQMkGushKsOS6U+d+2C9ZNeP+U+uwuv/xu8YBCBAgGb8YdNojcGzM4SbCtwvJ0fuOfmCWZvUoiumfE4x7rAhp1pa9OEbUe0a5HL+1v7+JLBgkNZ7Z2biiHaM6za7GjHCXU8rojatEQER+MpgDuQV3ZPx8RKRdiJgPnz9ApBHFYDHLDzDw==");
2430
cryptolens_handle.signature_verifier.set_exponent_base64(e, "AQAB");
2531

32+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
2633
cryptolens_handle.machine_code_computer.set_machine_code(e, "289jf2afs3");
2734

2835
// Reply from Cryptolens Web API

examples/VisualStudio/Example_Floating/Example_Floating.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#include <cryptolens/MachineCodeComputer_static.hpp>
77

88
namespace cryptolens = ::cryptolens_io::v20190401;
9+
10+
// Set up an alias for the handler class used to interact with the library. This configuration checks the expiry date
11+
// on the license. Use Configuration_Windows_IgnoreExpires to ignore the expiry date.
12+
//
13+
// For this example we use MachineCodeComputer_static where the machine code is set using set_machine_code(). Other
14+
// ways of computing the machine code are available, see README.md.
915
using Cryptolens = cryptolens::basic_Cryptolens<cryptolens::Configuration_Windows<cryptolens::MachineCodeComputer_static>>;
1016

1117
/*
@@ -22,6 +28,7 @@ void activate(char const* machine_code)
2228
cryptolens_handle.signature_verifier.set_modulus_base64(e, "khbyu3/vAEBHi339fTuo2nUaQgSTBj0jvpt5xnLTTF35FLkGI+5Z3wiKfnvQiCLf+5s4r8JB/Uic/i6/iNjPMILlFeE0N6XZ+2pkgwRkfMOcx6eoewypTPUoPpzuAINJxJRpHym3V6ZJZ1UfYvzRcQBD/lBeAYrvhpCwukQMkGushKsOS6U+d+2C9ZNeP+U+uwuv/xu8YBCBAgGb8YdNojcGzM4SbCtwvJ0fuOfmCWZvUoiumfE4x7rAhp1pa9OEbUe0a5HL+1v7+JLBgkNZ7Z2biiHaM6za7GjHCXU8rojatEQER+MpgDuQV3ZPx8RKRdiJgPnz9ApBHFYDHLDzDw==");
2329
cryptolens_handle.signature_verifier.set_exponent_base64(e, "AQAB");
2430

31+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
2532
cryptolens_handle.machine_code_computer.set_machine_code(e, machine_code);
2633

2734
cryptolens::optional<cryptolens::LicenseKey> license_key =

examples/VisualStudio/Example_Offline/Example_Offline.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
#include <cryptolens/MachineCodeComputer_static.hpp>
1010

1111
namespace cryptolens = ::cryptolens_io::v20190401;
12+
13+
// Set up an alias for the handler class used to interact with the library. This configuration checks the expiry date
14+
// on the license. Use Configuration_Windows_IgnoreExpires to ignore the expiry date.
15+
//
16+
// For this example we use MachineCodeComputer_static where the machine code is set using set_machine_code(). Other
17+
// ways of computing the machine code are available, see README.md.
1218
using Cryptolens = cryptolens::basic_Cryptolens<cryptolens::Configuration_Windows<cryptolens::MachineCodeComputer_static>>;
1319

1420
/*
@@ -58,6 +64,7 @@ int write_license_key_to_file(LPCWSTR file_name)
5864
cryptolens_handle.signature_verifier.set_modulus_base64(e, "khbyu3/vAEBHi339fTuo2nUaQgSTBj0jvpt5xnLTTF35FLkGI+5Z3wiKfnvQiCLf+5s4r8JB/Uic/i6/iNjPMILlFeE0N6XZ+2pkgwRkfMOcx6eoewypTPUoPpzuAINJxJRpHym3V6ZJZ1UfYvzRcQBD/lBeAYrvhpCwukQMkGushKsOS6U+d+2C9ZNeP+U+uwuv/xu8YBCBAgGb8YdNojcGzM4SbCtwvJ0fuOfmCWZvUoiumfE4x7rAhp1pa9OEbUe0a5HL+1v7+JLBgkNZ7Z2biiHaM6za7GjHCXU8rojatEQER+MpgDuQV3ZPx8RKRdiJgPnz9ApBHFYDHLDzDw==");
5965
cryptolens_handle.signature_verifier.set_exponent_base64(e, "AQAB");
6066

67+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
6168
cryptolens_handle.machine_code_computer.set_machine_code(e, "289jf2afs3");
6269

6370
cryptolens::optional<cryptolens::LicenseKey> license_key =

examples/unix/example_activate.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99

1010
namespace cryptolens = ::cryptolens_io::v20190401;
1111

12+
// Set up an alias for the handler class used to interact with the library. This configuration checks the expiry date
13+
// on the license. Use Configuration_Unix_IgnoreExpires to ignore the expiry date.
14+
//
15+
// For this example we use MachineCodeComputer_static where the machine code is set using set_machine_code(). Other
16+
// ways of computing the machine code are available, see README.md.
1217
using Cryptolens = cryptolens::basic_Cryptolens<cryptolens::Configuration_Unix<cryptolens::MachineCodeComputer_static>>;
1318

1419
/*
1520
* This example uses the basic_Cryptolens class to make a request to the WebAPI
1621
* and then checks some properties of the license keys.
1722
*/
18-
1923
int main()
2024
{
2125
curl_global_init(CURL_GLOBAL_SSL);
@@ -26,6 +30,8 @@ int main()
2630
// on cryptolens.io
2731
cryptolens_handle.signature_verifier.set_modulus_base64(e, "khbyu3/vAEBHi339fTuo2nUaQgSTBj0jvpt5xnLTTF35FLkGI+5Z3wiKfnvQiCLf+5s4r8JB/Uic/i6/iNjPMILlFeE0N6XZ+2pkgwRkfMOcx6eoewypTPUoPpzuAINJxJRpHym3V6ZJZ1UfYvzRcQBD/lBeAYrvhpCwukQMkGushKsOS6U+d+2C9ZNeP+U+uwuv/xu8YBCBAgGb8YdNojcGzM4SbCtwvJ0fuOfmCWZvUoiumfE4x7rAhp1pa9OEbUe0a5HL+1v7+JLBgkNZ7Z2biiHaM6za7GjHCXU8rojatEQER+MpgDuQV3ZPx8RKRdiJgPnz9ApBHFYDHLDzDw==");
2832
cryptolens_handle.signature_verifier.set_exponent_base64(e, "AQAB");
33+
34+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
2935
cryptolens_handle.machine_code_computer.set_machine_code(e, "289jf2afs3");
3036

3137
cryptolens::optional<cryptolens::LicenseKey> license_key =

examples/unix/example_create_trial_key.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99

1010
namespace cryptolens = ::cryptolens_io::v20190401;
1111

12+
// Set up an alias for the handler class used to interact with the library. This configuration checks the expiry date
13+
// on the license. Use Configuration_Unix_IgnoreExpires to ignore the expiry date.
14+
//
15+
// For this example we use MachineCodeComputer_static where the machine code is set using set_machine_code(). Other
16+
// ways of computing the machine code are available, see README.md.
1217
using Cryptolens = cryptolens::basic_Cryptolens<cryptolens::Configuration_Unix<cryptolens::MachineCodeComputer_static>>;
1318

1419
/*
1520
* This example uses the basic_Cryptolens class to make a request to the WebAPI
1621
* and then checks some properties of the license keys.
1722
*/
18-
1923
int main()
2024
{
2125
curl_global_init(CURL_GLOBAL_SSL);
@@ -26,6 +30,8 @@ int main()
2630
// on cryptolens.io
2731
cryptolens_handle.signature_verifier.set_modulus_base64(e, "khbyu3/vAEBHi339fTuo2nUaQgSTBj0jvpt5xnLTTF35FLkGI+5Z3wiKfnvQiCLf+5s4r8JB/Uic/i6/iNjPMILlFeE0N6XZ+2pkgwRkfMOcx6eoewypTPUoPpzuAINJxJRpHym3V6ZJZ1UfYvzRcQBD/lBeAYrvhpCwukQMkGushKsOS6U+d+2C9ZNeP+U+uwuv/xu8YBCBAgGb8YdNojcGzM4SbCtwvJ0fuOfmCWZvUoiumfE4x7rAhp1pa9OEbUe0a5HL+1v7+JLBgkNZ7Z2biiHaM6za7GjHCXU8rojatEQER+MpgDuQV3ZPx8RKRdiJgPnz9ApBHFYDHLDzDw==");
2832
cryptolens_handle.signature_verifier.set_exponent_base64(e, "AQAB");
33+
34+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
2935
cryptolens_handle.machine_code_computer.set_machine_code(e, "289jf2afs4");
3036

3137
// We use two tokens, one for the call the activate() and one for the call to create_trial_key()

examples/unix/example_external.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#include <cryptolens/MachineCodeComputer_static.hpp>
77

88
namespace cryptolens = ::cryptolens_io::v20190401;
9+
10+
// Set up an alias for the handler class used to interact with the library. This configuration checks the expiry date
11+
// on the license. Use Configuration_Unix_IgnoreExpires to ignore the expiry date.
12+
//
13+
// For this example we use MachineCodeComputer_static where the machine code is set using set_machine_code(). Other
14+
// ways of computing the machine code are available, see README.md.
915
using Cryptolens = cryptolens::basic_Cryptolens<cryptolens::Configuration_Unix<cryptolens::MachineCodeComputer_static>>;
1016

1117
/*
@@ -21,6 +27,8 @@ int main()
2127
// on cryptolens.io
2228
cryptolens_handle.signature_verifier.set_modulus_base64(e, "khbyu3/vAEBHi339fTuo2nUaQgSTBj0jvpt5xnLTTF35FLkGI+5Z3wiKfnvQiCLf+5s4r8JB/Uic/i6/iNjPMILlFeE0N6XZ+2pkgwRkfMOcx6eoewypTPUoPpzuAINJxJRpHym3V6ZJZ1UfYvzRcQBD/lBeAYrvhpCwukQMkGushKsOS6U+d+2C9ZNeP+U+uwuv/xu8YBCBAgGb8YdNojcGzM4SbCtwvJ0fuOfmCWZvUoiumfE4x7rAhp1pa9OEbUe0a5HL+1v7+JLBgkNZ7Z2biiHaM6za7GjHCXU8rojatEQER+MpgDuQV3ZPx8RKRdiJgPnz9ApBHFYDHLDzDw==");
2329
cryptolens_handle.signature_verifier.set_exponent_base64(e, "AQAB");
30+
31+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
2432
cryptolens_handle.machine_code_computer.set_machine_code(e, "289jf2afs3");
2533

2634
// Reply from Cryptolens Web API

examples/unix/example_floating.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
#include <cryptolens/MachineCodeComputer_static.hpp>
99

1010
namespace cryptolens = ::cryptolens_io::v20190401;
11+
12+
// Set up an alias for the handler class used to interact with the library. This configuration checks the expiry date
13+
// on the license. Use Configuration_Unix_IgnoreExpires to ignore the expiry date.
14+
//
15+
// For this example we use MachineCodeComputer_static where the machine code is set using set_machine_code(). Other
16+
// ways of computing the machine code are available, see README.md.
1117
using Cryptolens = cryptolens::basic_Cryptolens<cryptolens::Configuration_Unix<cryptolens::MachineCodeComputer_static>>;
1218

1319
/*
@@ -23,6 +29,8 @@ void activate(char const* machine_code)
2329
// on cryptolens.io
2430
cryptolens_handle.signature_verifier.set_modulus_base64(e, "khbyu3/vAEBHi339fTuo2nUaQgSTBj0jvpt5xnLTTF35FLkGI+5Z3wiKfnvQiCLf+5s4r8JB/Uic/i6/iNjPMILlFeE0N6XZ+2pkgwRkfMOcx6eoewypTPUoPpzuAINJxJRpHym3V6ZJZ1UfYvzRcQBD/lBeAYrvhpCwukQMkGushKsOS6U+d+2C9ZNeP+U+uwuv/xu8YBCBAgGb8YdNojcGzM4SbCtwvJ0fuOfmCWZvUoiumfE4x7rAhp1pa9OEbUe0a5HL+1v7+JLBgkNZ7Z2biiHaM6za7GjHCXU8rojatEQER+MpgDuQV3ZPx8RKRdiJgPnz9ApBHFYDHLDzDw==");
2531
cryptolens_handle.signature_verifier.set_exponent_base64(e, "AQAB");
32+
33+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
2634
cryptolens_handle.machine_code_computer.set_machine_code(e, machine_code);
2735

2836
cryptolens::optional<cryptolens::LicenseKey> license_key =

examples/unix/example_offline.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
#include <cryptolens/MachineCodeComputer_static.hpp>
1212

1313
namespace cryptolens = ::cryptolens_io::v20190401;
14+
15+
// Set up an alias for the handler class used to interact with the library. This configuration checks the expiry date
16+
// on the license. Use Configuration_Unix_IgnoreExpires to ignore the expiry date.
17+
//
18+
// For this example we use MachineCodeComputer_static where the machine code is set using set_machine_code(). Other
19+
// ways of computing the machine code are available, see README.md.
1420
using Cryptolens = cryptolens::basic_Cryptolens<cryptolens::Configuration_Unix<cryptolens::MachineCodeComputer_static>>;
1521

1622
/*
@@ -58,6 +64,8 @@ int write_license_key_to_file(char const* file_name)
5864
// on cryptolens.io
5965
cryptolens_handle.signature_verifier.set_modulus_base64(e, "khbyu3/vAEBHi339fTuo2nUaQgSTBj0jvpt5xnLTTF35FLkGI+5Z3wiKfnvQiCLf+5s4r8JB/Uic/i6/iNjPMILlFeE0N6XZ+2pkgwRkfMOcx6eoewypTPUoPpzuAINJxJRpHym3V6ZJZ1UfYvzRcQBD/lBeAYrvhpCwukQMkGushKsOS6U+d+2C9ZNeP+U+uwuv/xu8YBCBAgGb8YdNojcGzM4SbCtwvJ0fuOfmCWZvUoiumfE4x7rAhp1pa9OEbUe0a5HL+1v7+JLBgkNZ7Z2biiHaM6za7GjHCXU8rojatEQER+MpgDuQV3ZPx8RKRdiJgPnz9ApBHFYDHLDzDw==");
6066
cryptolens_handle.signature_verifier.set_exponent_base64(e, "AQAB");
67+
68+
// This line is only for MachineCodeComputer_static and sets the machine code to a static value
6169
cryptolens_handle.machine_code_computer.set_machine_code(e, "289jf2afs3");
6270

6371
cryptolens::optional<cryptolens::LicenseKey> license_key =

0 commit comments

Comments
 (0)