Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
penguingovernor committed Sep 27, 2018
1 parent cf2e892 commit f25aaf6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cmd/decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func init() {
inputMsg string = `the file to decrypt`
keyMsg string = `the file to use as the key to the decryption process`
outMsg string = `the file to output the decrypted data to
if ommitted, then the file will be out.xor
if omitted, then the file will be out.xor
if the input is "stdout", then the data will be placed to stdout`
)
decryptCmd.Flags().StringP("input", "i", "", inputMsg)
Expand Down
16 changes: 8 additions & 8 deletions cmd/encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,24 @@ func init() {
const (
inputMsg string = `the file to encrypt
if the file cannot be found, then the input is treated as a string and that is encrypted
if the flag is ommited, then stdin will be used as the source for encryption`
if the flag is omitted, then stdin will be used as the source for encryption`

outMsg string = `the file to output the encrypted data to
if ommitted, then the file will be out.xor
if omitted, then the file will be out.xor
if the input is "stdout", then the data will be placed to stdout`

outKeyMsg string = `the file to output the encrypted data to
if ommitted, then the file will be out.xor.key
if omitted, then the file will be out.xor.key
if the input is "stdout", then the data will be placed to stdout`

keyMsg string = `the file to use as the key to the enryption process
if the file cannot be found, then the input is treated as a string and that is used as the key
if the flag is ommited, then a one time pad will be used as the key
if the flag is omitted, then a one time pad will be used as the key
if the input is "stdin", then stdin will be used as the key`

sigMsg string = `the file to use as the signature to the enryption process
if the file cannot be found, then the input is treated as a string and that is used as the signature
if the flag is ommited, then "goxor" will be used as the signature
if the flag is omitted, then "goxor" will be used as the signature
if the input is "stdin", then stdin will be used as the signautre`
)
encryptCmd.Flags().StringP("input", "i", "", inputMsg)
Expand Down Expand Up @@ -200,7 +200,7 @@ func writeKey(data *protocol.Key, dest string) {
}

func getInput(input string) []byte {
// If ommitted
// If omitted
if input == "" {
fmt.Println("Reading from stdin for input, press ctrl-d to stop")
stdinBytes, err := ioutil.ReadAll(os.Stdin)
Expand All @@ -223,7 +223,7 @@ func getInput(input string) []byte {

func getKey(input string, length int) []byte {

// If ommitted, use otp
// If omitted, use otp
if input == "" {
fmt.Println("Using one time pad as key")
// Seed random
Expand Down Expand Up @@ -262,7 +262,7 @@ func getKey(input string, length int) []byte {
}

func getSignature(input string) []byte {
// If ommitted, use goxor
// If omitted, use goxor
if input == "" {
fmt.Println("Using \"goxor\" as signature")
return []byte("goxor")
Expand Down
2 changes: 1 addition & 1 deletion xor/xor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func Test_validate(t *testing.T) {
want: false,
},
{
name: "Smae length slices, same content",
name: "Same length slices, same content",
args: args{[]byte("four"), []byte("four")},
want: true,
},
Expand Down

0 comments on commit f25aaf6

Please sign in to comment.