Secret
The Secret data type is used for inputs that need to be kept confidential during computation. These input values are not visible to the program.
SecretInteger
SecretInteger
represents a user input secret integer value. This value can be a negative integer, a positive integer, or zero.
- Nada program
- Test file
src/multiplication.py
loading...
tests/multiplication_test.yaml
loading...
Run and test the multiplication program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run multiplication_test
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test multiplication_test
SecretUnsignedInteger
SecretUnsignedInteger
represents a user input secret unsigned integer value. This value can be zero or a positive integer.
- Nada program
- Test file
src/addition_unsigned.py
loading...
tests/addition_unsigned_test.yaml
loading...
Run and test the addition_unsigned program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run addition_unsigned_test
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test addition_unsigned_test
SecretBoolean
SecretBoolean
represents a user input secret boolean value. This value can be true or false.
- Nada program
- Test file
src/secret_conditional.py
loading...
tests/secret_conditional_test.yaml
loading...
Run and test the secret_conditional program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run secret_conditional_test
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test secret_conditional_test