MCPcopy Create free account

hub / github.com/arosspope/cipher-crypt / functions

Functions232 in github.com/arosspope/cipher-crypt

↓ 15 callersMethodis_valid
Will check if the text contains valid alphabetic symbols only.
src/common/alphabet.rs:39
↓ 14 callersMethodfind_position
(&self, c: char)
src/common/alphabet.rs:72
↓ 12 callersMethodmodulo
Performs a modulo on an index so that its value references a position within the alphabet. This function handles negative wrap around modulo as rust d
src/common/alphabet.rs:33
↓ 10 callersFunctionkeyed_alphabet
Generates a scrambled alphabet using a key phrase for a given alphabet type. Lets consider the key `or0an3ge` for an alphanumeric alphabet. The result
src/common/keygen.rs:13
↓ 10 callersMethodlength
(&self)
src/common/alphabet.rs:91
↓ 10 callersFunctionplayfair_table
Create a new Playfair key table The table is a 5x5 (I=J) matrix. Any repeated characters are removed and the key fills in the table from left to righ
src/common/keygen.rs:184
↓ 7 callersFunctionpolybius_square
Generate a 6x6 polybius square hashmap from an alphanumeric key. For successfull generation, the following must be met: # Panics The `key` must have
src/common/keygen.rs:101
↓ 6 callersMethodget_letter
(&self, index: usize, is_uppercase: bool)
src/common/alphabet.rs:79
↓ 6 callersFunctionshift_substitution
Performs a shift substitution of letters within a piece of text based on the index of them within the alphabet. This substitution is defined by the c
src/common/substitute.rs:12
↓ 4 callersFunctionkey_substitution
Performs a poly-substitution on a piece of text based on the index of its characters (within the alphabet) and the keystream `k`. This substitution i
src/common/substitute.rs:39
↓ 3 callersFunctioncolumnar_key
Validate and return a Columnar Transposition key given a specific keystream. # Panics The `keystream` length is 0. The `keystream` contains non-alpha
src/common/keygen.rs:56
↓ 3 callersFunctioncyclic_keystream
Generate a cyclic keystream. For this, we simply repeat the key until we have enough symbols to encrypt all alphabetic symbols of the message.
src/common/keygen.rs:225
↓ 3 callersMethodencrypt
Encrypt a message using a Porta cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Porta}; let v = Porta::new("melon".into()); assert_e
src/porta.rs:93
↓ 2 callersMethodapply_rules
Apply the PlayFair cipher algorithm. The operations for encrypt and decrypt are identical except for the direction of the substitution choice.
src/playfair.rs:149
↓ 2 callersMethodapply_slice
Apply rule 2 (Row) or rule 3 (Column). # Rule 2 If the letters appear on the same row of your table, replace them with the letters to their immediat
src/playfair.rs:234
↓ 2 callersMethodbigram
Apply rule 1 (bigrams). # Rule 1 If both letters are the same (or only one letter is left), add the null_char after the first letter. Encrypt the ne
src/playfair.rs:182
↓ 2 callersFunctiondecrypt
Decrypt a message using the Rot13 substitute cipher. # Examples Basic usage: ``` use cipher_crypt::Rot13; let m = "I am my own inverse"; assert_eq!
src/rot13.rs:38
↓ 2 callersMethoddecrypt
Decrypt a message using a Porta cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Porta}; let v = Porta::new(String::from("melon")); a
src/porta.rs:113
↓ 2 callersMethoddecrypt
Decrypt a message using a Vigenère cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Vigenere}; let v = Vigenere::new(String::from("gi
src/vigenere.rs:78
↓ 2 callersMethoddecrypt
Decrypt a message using a Caesar cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Caesar}; let c = Caesar::new(3); assert_eq!("Attack
src/caesar.rs:70
↓ 2 callersFunctionencrypt
Encrypt a message using the Rot13 substitute cipher. # Examples Basic usage: ``` use cipher_crypt::Rot13; let m = "I am my own inverse"; assert_eq!
src/rot13.rs:22
↓ 2 callersMethodencrypt
Encrypt a message with a Columnar Transposition cipher. All characters (including utf8) can be encrypted during the transposition process. However, i
src/columnar_transposition.rs:74
↓ 2 callersMethodencrypt
Encrypt a message using a Vigenère cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Vigenere}; let v = Vigenere::new(String::from("gi
src/vigenere.rs:54
↓ 2 callersMethodencrypt
Encrypt a message using a Caesar cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Caesar}; let c = Caesar::new(3); assert_eq!("Dwwdfn
src/caesar.rs:47
↓ 2 callersFunctionfind_corners
Identifies 2 corners of the rectangle.
src/playfair.rs:272
↓ 2 callersMethodmultiplicative_inverse
Finds the multiplicative inverse of an index such that `a*x = 1 (mod n)`. Where `a` is the number we are inverting, `x` is the multiplicative inverse,
src/common/alphabet.rs:55
↓ 2 callersMethodscrub
Will scrub non-alphabetic characters from the text and return the scrubed version.
src/common/alphabet.rs:45
↓ 1 callersMethodapply_rectangle
Apply rule 4 (Rectangle). # Rule 4 If the letters are not on the same row or column, replace them with the letters on the same row respectively but
src/playfair.rs:260
↓ 1 callersFunctionconcatonated_keystream
Generate a concatonated keystream (key + message).
src/common/keygen.rs:232
↓ 1 callersFunctiondecode_sequence
Attempts to decode a morsecode sequence into a character of the known alphabet. Will return None if the Morse code isn't present in the alphabet
src/common/morse.rs:60
↓ 1 callersMethoddecrypt
Decrypt a message using an Autokey cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Autokey}; let a = Autokey::new(String::from("fort
src/autokey.rs:75
↓ 1 callersMethoddecrypt
Decrypt a message using a Hill cipher. It is expected that this message contains alphabetic characters only. Due to the nature of the hill cipher it
src/hill.rs:167
↓ 1 callersFunctionencode_character
Attempts to convert a character into a morse code sequence Will return None if the character isn't present in the known alphabet
src/common/morse.rs:70
↓ 1 callersMethodencrypt
Encrypt a message using the Baconian cipher The message to be encrypted can only be ~18% of the decoy_text as each character of message is encoded by
src/baconian.rs:193
↓ 1 callersMethodencrypt
Encrypt a message using an Autokey cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Autokey}; let a = Autokey::new(String::from("fort
src/autokey.rs:51
↓ 1 callersMethodencrypt
Encrypt a message using a Hill cipher. It is expected that this message contains alphabetic characters only. Due to the nature of the hill cipher it
src/hill.rs:111
↓ 1 callersFunctionget_code
Get the code for a given key (source character)
src/baconian.rs:117
↓ 1 callersFunctionget_key
Gets the key (the source character) for a given cipher text code
src/baconian.rs:136
↓ 1 callersFunctionis_numeric
Determines if the char is a number.
src/common/alphabet.rs:171
Functiona_shares_factor
()
src/affine.rs:147
Functionalphabet_encrypt
()
src/rot13.rs:56
Functionb_shares_factor
()
src/affine.rs:141
Functionbad_key
()
src/fractionated_morse.rs:294
Functionbigram_handles_odd_length
()
src/playfair.rs:299
Functionbigram_handles_repeats
()
src/playfair.rs:289
Methodcalc_current_rail
For a given column and the total number of 'rails' (rows), determine the current rail that should be referenced.
src/railfence.rs:166
Methodcalc_inverse_key
Calculates the inverse key for decryption
src/hill.rs:306
Functioncheck_playfair_positions
()
src/common/alphabet.rs:220
Functioncheck_playfair_retrieval
()
src/common/alphabet.rs:231
Functionconcatonated_larger_base_key
()
src/common/keygen.rs:265
Functionconcatonated_smaller_base_key
()
src/common/keygen.rs:270
Functioncyclic_larger_base_key
()
src/common/keygen.rs:260
Functioncyclic_smaller_base_key
()
src/common/keygen.rs:252
Methoddecode_morse
Takes a sequence of trigraphs, which is then interpreted as morse code so that it may be converted back to plaintext.This function returns `Err` if an
src/fractionated_morse.rs:197
Functiondecrypt
()
src/porta.rs:130
Methoddecrypt
Decrypt a message using a Railfence cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Railfence}; let r = Railfence::new(3); assert_eq
src/railfence.rs:99
Methoddecrypt
Decrypt a ciphertext with a Columnar Transposition cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, ColumnarTransposition}; let key_w
src/columnar_transposition.rs:146
Methoddecrypt
Decrypt a message using a Polybius square cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Polybius}; let p = Polybius::new((String::
src/polybius.rs:119
Methoddecrypt
Decrypt a message with the Playfair cipher. # Warning The 5x5 key table requires any 'J' characters in the message to be substituted with 'I' charact
src/playfair.rs:126
Methoddecrypt
Decrypt a message using a Fractionated Morse cipher. The Fractionated Morse alphabet only contains the normal alphabetic characters `a-z`, therefore
src/fractionated_morse.rs:107
Methoddecrypt
Decrypt a message that was encrypted with the Baconian cipher # Examples Basic usage: ``` use cipher_crypt::{Cipher, Baconian}; let b = Baconian::n
src/baconian.rs:271
Methoddecrypt
Decrypt a message using a Scytale cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Scytale}; let ct = Scytale::new(6); assert_eq!("Pr
src/scytale.rs:97
Methoddecrypt
Decrypt a message using a ADFGVX cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, ADFGVX}; let polybius_key = String::from("ph0qg64me
src/adfgvx.rs:116
Methoddecrypt
Decrypt a message using an Affine cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Affine}; let a = Affine::new((3, 7)); assert_eq!("
src/affine.rs:78
Functiondecrypt_a_classic
()
src/baconian.rs:384
Functiondecrypt_bad_message
()
src/fractionated_morse.rs:306
Functiondecrypt_long_key
()
src/railfence.rs:240
Functiondecrypt_message
()
src/polybius.rs:173
Functiondecrypt_message
()
src/caesar.rs:93
Functiondecrypt_message
()
src/adfgvx.rs:169
Functiondecrypt_message
()
src/affine.rs:105
Functiondecrypt_mixed_case
()
src/railfence.rs:233
Functiondecrypt_mixed_case
()
src/fractionated_morse.rs:259
Methoddecrypt_morse
Takes ciphertext and converts it to a sequence of trigraph symbols. return `Err` if a non-alphabetic symbol is present in the message.
src/fractionated_morse.rs:178
Functiondecrypt_short_key
()
src/railfence.rs:226
Functiondecrypt_test
()
src/railfence.rs:219
Functiondecrypt_test
()
src/fractionated_morse.rs:245
Functiondecrypt_test
()
src/vigenere.rs:103
Functiondecrypt_test
()
src/autokey.rs:137
Functiondecrypt_traditional
()
src/baconian.rs:393
Functiondecrypt_with_space_padding
()
src/adfgvx.rs:187
Functiondecrypt_with_symbols
()
src/hill.rs:351
Methodencode_to_morse
Takes a message and converts it to Morse code, using the character `|` as a separator. The transposed sequence is ended with two separators `||`. This
src/fractionated_morse.rs:137
Functionencrypt
()
src/porta.rs:123
Methodencrypt
Encrypt a message using a Railfence cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Railfence}; let r = Railfence::new(3); assert_eq
src/railfence.rs:45
Methodencrypt
Encrypt a message using a Polybius square cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Polybius}; let p = Polybius::new((String::
src/polybius.rs:91
Methodencrypt
Encrypt a message with the Playfair cipher. # Warning The 5x5 key table requires any 'J' characters in the message to be substituted with 'I' charact
src/playfair.rs:84
Methodencrypt
Encrypt a message using a Fractionated Morse cipher. Morse code supports the characters `a-z`, `A-Z`, `0-9` and the special characters `@ ( ) . , : '
src/fractionated_morse.rs:61
Methodencrypt
Encrypt a message using a Scytale cipher. Whilst all characters (including utf8) can be encrypted during the transposition process, it is important t
src/scytale.rs:57
Methodencrypt
Encrypt a message using a ADFGVX cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, ADFGVX}; let polybius_key = String::from("ph0qg64me
src/adfgvx.rs:80
Methodencrypt
Encrypt a message using an Affine cipher. # Examples Basic usage: ``` use cipher_crypt::{Cipher, Affine}; let a = Affine::new((3, 7)); assert_eq!("
src/affine.rs:56
Functionencrypt_bad_message
()
src/fractionated_morse.rs:299
Functionencrypt_decoy_too_short
()
src/baconian.rs:351
Functionencrypt_long_key
()
src/railfence.rs:212
Functionencrypt_long_key
()
src/fractionated_morse.rs:279
Functionencrypt_message
()
src/polybius.rs:152
Functionencrypt_message
()
src/caesar.rs:87
Functionencrypt_message
()
src/affine.rs:99
Functionencrypt_message_spaced
()
src/baconian.rs:327
Functionencrypt_mixed_case
()
src/railfence.rs:198
next →1–100 of 232, ranked by callers