Lines Matching defs:passPhrase
68 string EncryptString(const char *plaintext, const char *passPhrase);
69 string DecryptString(const char *ciphertext, const char *passPhrase);
71 void EncryptFile(const char *in, const char *out, const char *passPhrase);
72 void DecryptFile(const char *in, const char *out, const char *passPhrase);
260 char passPhrase[MAX_PHRASE_LENGTH], plaintext[1024];
263 cin.getline(passPhrase, MAX_PHRASE_LENGTH);
268 string ciphertext = EncryptString(plaintext, passPhrase);
271 string decrypted = DecryptString(ciphertext.c_str(), passPhrase);
286 char passPhrase[MAX_PHRASE_LENGTH];
288 cin.getline(passPhrase, MAX_PHRASE_LENGTH);
290 EncryptFile(argv[2], argv[3], passPhrase);
292 DecryptFile(argv[2], argv[3], passPhrase);
508 string EncryptString(const char *instr, const char *passPhrase)
512 DefaultEncryptorWithMAC encryptor(passPhrase, new HexEncoder(new StringSink(outstr)));
519 string DecryptString(const char *instr, const char *passPhrase)
523 HexDecoder decryptor(new DefaultDecryptorWithMAC(passPhrase, new StringSink(outstr)));
530 void EncryptFile(const char *in, const char *out, const char *passPhrase)
532 FileSource f(in, true, new DefaultEncryptorWithMAC(passPhrase, new FileSink(out)));
535 void DecryptFile(const char *in, const char *out, const char *passPhrase)
537 FileSource f(in, true, new DefaultDecryptorWithMAC(passPhrase, new FileSink(out)));