Git Product home page Git Product logo

cogetta's Introduction

Cogetta is a substitution cipher written in python 3 and released under the MIT License.

cogetta's People

Contributors

lewiswhittard avatar

Watchers

 avatar

cogetta's Issues

Dev | Key Validation

Valid Characters

"0"
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"-"

The following examples meets the criteria:

0-1-2-3-4-5-6-7
7-6-5-4-3-2-1-0
0-2-1-3-4-5-6-7

The following Combinations do not meet the criteria:

0-1-2-3-4-5-5-6 no duplicates
0-1-2-3-4-5-6 - too short of a string
-0-1-2-3-4-5-6-7 starts with a minus
0-1-2-3-4-5-6-7- ends with a minus
--0-1-2-3-4-5-6-7 contains double minus
0-1-2-3-4-5-6-8 number too large
0-1-2-3-4-5-6-+ invalid character
0-1-2-3-4-5-6-7 too long of a string

Testing | Quit

Scenario Quit

  • Test Case

Given I open Cogetta
Notice the instructions state "3: Quit"
And input 3
Notice the program closes

Testing | Encrypt and decrypt

Scenario Single Wheel Test:

  • Test Case: Correct Values Test
    Given I set the versionId in the character set to "Test Set"
    Then I I use the Key "0-2-3-1"
    and you use the message "ASDFA"
    notice A becomes A
    Wheel Turn 1-3-0-2
    notice S becomes F
    Wheel Turn 2-0-1-3
    notice D becomes S
    Wheel turn 3-1-2-0
    notice F becomes A
    Wheel turn 0-2-3-1
    notice A becomes A
    Your final message is "AFSAA"
    Your Decrypt is "ASDFA"
  • Test Case: Encrypt and Decrypt all supported Characters
    and do the following:

Image

Scenario Triple Wheel Test :

  • Test Case: Encrypt and Decrypt all supported Characters
    and do the following:

Image

  • Test Case: Correct Values Test
    Given I set the versionId in the character set to "Test Set"
    Then I I use the Key "1-2-3-0+0-3-2-1+2-0-3-1"
    And the message "ASDFAASDFAASDFAAS"
    Notice A becomes S Then becomes F then becomes S
    Wheel Turn 2-3-0-1+0-3-2-1+2-0-3-1
    Notice S becomes F then becomes S then becomes A
    Wheel Turn 3-0-1-2 +0-3-2-1+2-0-3-1
    Notice D becomes S then becomes F then becomes S
    Wheel Turn 0-1-2-3+0-3-2-1+2-0-3-1
    Notice F becomes F then becomes S then becomes A
    Wheel Turn 1-2-3-0+1-0-3-2+2-0-3-1 (1 and 2)
    Notice A becomes S then becomes A then becomes D
    Wheel Turn 2-3-0-1+1-0-3-2+2-0-3-1
    Notice A becomes D then becomes F then becomes S
    Wheel Turn 3-0-1-2+1-0-3-2+2-0-3-1
    Notice S becomes A then becomes S then becomes A
    Wheel Turn 0-1-2-3+1-0-3-2+2-0-3-1
    Notice D becomes D then becomes F then becomes S
    Wheel Turn 1-2-3-0+2-1-0-3+2-0-3-1 (1 and 2)
    Notice F becomes A then becomes D then becomes F
    Wheel Turn 2-3-0-1+2-1-0-3+2-0-3-1
    Notice A becomes D then becomes A then becomes D
    Wheel Turn 3-0-1-2+2-1-0-3+2-0-3-1
    Notice A becomes F then becomes F then becomes S
    Wheel Turn 0-1-2-3+2-1-0-3+2-0-3-1
    Notice S becomes S then becomes S then becomes A
    Wheel Turn 1-2-3-0+3-2-1-0+2-0-3-1 (1 and 2)
    Notice D becomes F then becomes A then Becomes D
    Wheel Turn 2-3-0-1+3-2-1-0+2-0-3-1
    Notice F becomes S then becomes D then becomes F
    Wheel Turn 3-0-1-2+3-2-1-0+2-0-3-1
    Notice A becomes F then becomes A then becomes D
    Wheel Turn 0-1-2-3+3-2-1-0+2-0-3-1
    Notice A becomes A then becomes F then becomes S
    Wheel Turn 1-2-3-0+0-3-2-1+3-1-0-2 (1 and 2 and 3)
    Notice S becomes D then becomes D then becomes A
    Your final message is "SASADSASFDSADFDSA"
    and your decrypt is "ASDFAASDFAASDFAAS"

Marketing | Post

Today I announce the release of Cogetta 1.0.0, a substitution cipher. I started this project originally to learn Python back in 2021 and picked back up in August this year

This project has included a number of firsts:

• My first python based software to be released.

•it's the first cipher I have built.

• My first project been released under the MIT License.

• My first project to use GitHub’s Projects, Milestones and Issues.

I would like to thank everyone who has given feedback along the way!

Portfolio: https://lewiswhittard.co.uk/PortfolioPiece?Id=4

Github Repository: https://github.com/LewisWhittard/Cogetta

.

#python #cipher #project #portfolio

Testing | Ensure works in python 3.11.0

Scenario

  • Test Case: Python 3.7.9

Given I use the key "65-5-8-6-50-30-45-24-47-62-16-18-85-51-10-37-49-61-34-29-41-72-77-48-32-55-25-1-15-82-21-14-42-9-53-2-56-46-92-90-84-67-63-91-60-7-12-58-23-33-13-35-76-64-69-26-89-74-39-44-54-27-36-28-52-75-79-94-78-80-88-59-87-73-66-19-4-31-38-57-70-68-81-3-20-95-86-71-40-93-11-17-22-0-43-83"
and I encrypt the message "The quick brown fox jumps over the lazy dog."
and get the result "q!cKtqE}NQscIT!WRNr!NG3:D/WFCu+h~H\bQD|>|+|L"
then the decrypt is "The quick brown fox jumps over the lazy dog."

-[x] Test Case: Python 3.11.0 check key genarates and is validated agaist
Given I generate a key
then attempt to use it
notice the validation does not stop me

  • Test Case: Python 3.11.0

Given I use the key "65-5-8-6-50-30-45-24-47-62-16-18-85-51-10-37-49-61-34-29-41-72-77-48-32-55-25-1-15-82-21-14-42-9-53-2-56-46-92-90-84-67-63-91-60-7-12-58-23-33-13-35-76-64-69-26-89-74-39-44-54-27-36-28-52-75-79-94-78-80-88-59-87-73-66-19-4-31-38-57-70-68-81-3-20-95-86-71-40-93-11-17-22-0-43-83"
and I encrypt the message "The quick brown fox jumps over the lazy dog."
and get the result "q!cKtqE}NQscIT!WRNr!NG3:D/WFCu+h~H\bQD|>|+|L"
then the decrypt is "The quick brown fox jumps over the lazy dog."

Dev | Key Generation

Key Generation

Must generate a random key between 0 and 7.
Example: 0-1-2-3-4-5-6-7.

Marketing | Cogger Logo

Logo used for the Cogger project:

  • Type face lobster 1.3
  • Smiley face in form of cog.
  • Flat Colours using 323232 and ffe100.
  • Copyright 2021

Test | Key Generation

  • Scenario
  • Test Case:
    Given I Press 0.
    then notice an output a string of numbers separated by "-" between 0-7.
    Result "1-7-3-2-4-6-0-5".

Testing | Message Validation

Scenario

  • Scenario: Single Wheel Key
  • Test Case Invalid Char:

Given run Open Cogetta
And select Encrypt
And a valid key
and use the invalid character "É"
Notice I get the Error "Unsupported charecter detected: É"

  • Test Case No message:

Given run Open Cogetta
And select Encrypt
And a valid key
put in no message
Notice I get the Error "No String"

  • Test Case versionId 100 Chars:

Given run Open Cogetta
And select Encrypt
And a valid key
put in the message "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '!', '"', '#', '$', '%', '&', '/', "'", '(', ')', '*', '+', ',', '-', '.', '\', ':', ';', '<', '=', '>', '?', '@', '[', ']', '^', '_', '`', '{', '|', '}', '~', ' ', '£']"
Notice I get no error

  • Test Case message AsscII test:

Given run Open Cogetta
And select Encrypt
And a valid key
put in the message "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ "
and not including "\t\n\r\x0b\x0c"
Notice I get no error

Testing | Key Validation

  • Scenario: Single Wheel Key
  • Test Case Invalid Char:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-e"
Notice I get the Error "Unsupported charecter detected: e"

  • Test Case Repeated ID:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-80"
Notice I get the Error "Invalid wheel key values are not unique"

  • Test Case No Key:

Given run Open Cogetta
And select Encrypt
And use the Key ""
Notice I get the Error "No key"

  • Test Case Key starts with -:

Given run Open Cogetta
And select Encrypt
And use the Key "-49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25"
Notice I get the Error "Check start and end of each wheel key"

  • Test Case Key ends with -:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25-"
Notice I get the Error "Check start and end of each wheel key"

  • Test Case Key contains --:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25--"
Notice I get the Error "Invalid combination"

  • Test Case Key starts with +:

Given run Open Cogetta
And select Encrypt
And use the Key "+49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25"
Notice I get the Error "Check start and end of each wheel key"

  • Test Case Key ends with +:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25+"
Notice I get the Error "Check start and end of each wheel key"

  • Test Case Key contains ++:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25++"
Notice I get the Error "Invalid combination"

  • Test Case Key contains -+:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25-+"
Notice I get the Error "Invalid combination"

  • Test Case Key contains +-:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25+-"
Notice I get the Error "Invalid combination"

  • Test Case Key ID is higher then Max value:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-100"
Notice I get the Error "Value is too large 100"

  • Test Case Key ID is low then minimum value:

and edit the minimum value to be 1
Given run Open Cogetta
And select Encrypt
And use the Key "19-34-10-2-48-75-28-11-15-7-42-89-37-20-26-76-69-53-80-1-18-93-45-70-86-29-12-22-25-64-21-31-67-78-6-55-5-14-66-81-3-24-13-57-8-95-35-52-62-49-83-46-65-74-33-58-50-16-27-90-88-9-41-77-56-92-23-51-4-36-68-79-61-40-30-71-0-54-73-47-43-63-84-91-39-87-17-94-32-44-72-38-60-59-82-85"
Notice I get the Error "Value is too small 0"

  • Test Case Key Too Short:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80"
Notice I get the Error "Invalid key 95 96"

  • Test Case Key Too Long:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25-97"
Notice I get the Error "Invalid key 97 96"

  • Test Case Valid Key:

Given run Open Cogetta
And select Encrypt
And use the Key "49-45-14-37-57-48-19-0-95-59-11-7-2-29-63-18-1-36-35-5-77-70-26-40-58-52-27-84-17-67-10-50-38-22-12-90-56-69-74-32-6-20-16-76-46-54-21-64-60-83-44-89-28-61-43-41-73-87-86-51-34-78-24-8-85-81-39-92-88-3-72-65-33-13-23-42-55-31-79-66-47-15-75-94-71-82-62-93-4-53-91-68-30-9-80-25"
Notice I get the Message "What is your message"

  • Scenario: Tripple Wheel Key
  • Test Case Invalid Char:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-e"
Notice I get the Error "Unsupported charecter detected: e"

  • Test Case Repeated ID:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-56"
Notice I get the Error "Invalid wheel key values are not unique"

  • Test Case Key ends with -:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-49-"
Notice I get the Error "Check start and end of each wheel key"

  • Test Case Key contains --:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-49--"
Notice I get the Error "Invalid combination"

  • Test Case Key ends with +:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-49+"
Notice I get the Error "Check start and end of each wheel key"

  • Test Case Key contains ++:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-49++"
Notice I get the Error "Invalid combination"

  • Test Case Key contains -+:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-49-+"
Notice I get the Error "Invalid combination"

  • Test Case Key contains +-:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-49+-"
Notice I get the Error "Invalid combination"

  • Test Case Key ID is higher then Max value:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-100"
Notice I get the Error "Value is too large 100"

  • Test Case Key Too Short:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56"
Notice I get the Error "Invalid key 95 96"

  • Test Case Key Too Long:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-49-97"
Notice I get the Error "Invalid key 97 96"

  • Test Case Key ID is higher then Max value (first Wheel Key):

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-100+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-49"
Notice I get the Error "Value is too large 100"

  • Test Case Valid Key:

Given run Open Cogetta
And select Encrypt
And use the Key "77-32-10-35-84-20-21-48-64-80-4-3-44-17-58-47-15-75-59-87-85-29-31-67-38-24-16-36-76-1-5-9-19-95-72-6-53-90-49-57-8-41-2-68-11-56-0-26-73-69-61-71-22-14-88-39-51-83-23-60-50-70-93-63-81-94-40-89-82-34-66-46-42-12-37-27-18-25-33-43-13-74-62-28-45-52-86-7-92-91-30-54-55-78-65-79+41-45-7-30-63-76-28-10-40-85-84-11-1-90-95-69-12-82-27-57-32-13-94-5-26-70-23-58-19-17-61-34-8-44-9-43-35-25-29-38-33-50-91-78-73-55-6-47-3-64-31-86-67-81-37-79-22-42-24-60-48-71-21-89-88-20-14-75-59-54-56-92-52-66-87-65-80-74-77-53-51-49-62-46-36-72-15-18-93-83-39-2-68-4-0-16+16-83-4-18-60-69-95-24-53-25-72-6-89-62-36-47-46-85-39-38-75-19-50-65-86-44-12-71-76-77-52-5-55-48-0-8-28-79-2-41-63-29-90-91-67-37-32-88-93-35-43-13-57-54-64-7-66-27-26-22-1-92-20-51-10-31-14-58-45-70-61-23-30-74-9-78-11-84-68-82-40-21-42-87-94-81-34-33-15-17-3-80-59-73-56-49"
Notice I get the Message "What is your message:"

Testing | Generate Key

Scenario Generate key:

  • Test Case Single Wheeled Key:

Given I open cogetta main
Then I press 0
and input 1

  • Then notice it generates a key
  • all values are unique
  • separated by "-"
  • the lowest value is 0
  • and the highest value is 95
  • and the length is 96
  • My Result: "58-95-92-4-75-36-34-41-81-93-66-49-12-6-56-80-71-37-7-16-24-67-57-0-69-31-90-47-60-13-42-84-65-43-54-64-23-53-46-1-25-63-38-32-68-39-26-2-94-19-18-88-20-85-29-62-48-44-76-73-17-87-28-3-10-33-30-51-40-15-59-91-70-8-86-61-74-52-22-27-35-77-72-89-55-45-14-21-79-9-83-82-11-78-5-50"

Scenario Generate key:

  • Test Case Single Wheeled Key:

Given I open cogetta
Then I press 0
and input 3

  • Then notice it generates 3 wheel keys
  • notice its separated by a plus
  • my Result: "8-71-38-20-31-60-91-47-62-77-76-78-3-27-70-53-50-41-49-64-40-23-2-15-25-10-81-12-9-39-82-45-66-89-44-74-75-0-85-56-7-14-80-32-18-63-43-61-46-69-13-57-34-4-84-19-16-33-17-88-51-21-26-90-95-52-86-48-72-65-37-59-30-67-92-11-68-79-28-58-73-24-94-5-87-42-54-55-83-36-6-22-29-35-1-93+12-15-56-30-76-0-35-70-79-45-31-71-46-32-22-44-61-17-27-19-48-3-64-38-81-28-77-36-50-8-9-18-53-47-75-16-29-85-42-87-2-74-14-43-73-69-21-54-23-34-86-55-90-20-62-33-82-5-10-84-51-66-4-78-40-49-67-63-13-58-6-59-91-24-1-57-93-72-68-25-65-41-88-11-95-37-39-60-92-89-83-94-26-7-80-52+20-40-60-50-13-1-27-58-26-3-66-71-28-89-95-21-64-12-93-63-22-54-72-68-23-35-43-41-88-74-90-77-44-6-42-81-59-62-11-84-55-56-37-19-15-67-17-92-18-39-5-16-57-69-31-73-82-34-48-79-80-87-94-65-76-49-70-46-8-14-25-4-33-9-61-2-75-24-0-10-29-91-36-85-52-45-32-51-53-83-38-78-30-86-47-7"

Test | Key Validation

  • Scenario:
  • Test Case: String Too Long
  • Test Case: String Too Short
  • Test Case: Too Too High Value
  • Test Case: Too Too Low Value
  • Test Case: Correct Value
  • Test Case: Repeated Value
  • Test Case: Minus at the front
  • Test Case: Minus at the back
  • Test Case: Double Minus
  • Test Case: Unsupported Character

Testing | UI display text

Scenario UI Display Text

  • Test Case: First time of opening the program

The following is printed on boot:
Cogetta • © Lewis Whittard 2022 • MIT License • Version: 1.0.0
0: Genarate a key
1: Encrypt
2: Decrypt
3: Quit
Please enter a Number:

  • Test Case: after using an option

The following is printed on use:
0: Genarate a key
1: Encrypt
2: Decrypt
3: Quit
Please enter a Number:

  • Test Case: invalid or no option selected

Given I open Cogetta
and put in a invalid number or no value
notice I get the error "Incorrect value please refer to the list of commands"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.