Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you name a component that both encrypts and decrypts depending on method you use? [closed]

I would like to give a good name to class that will contain both methods for encryption and decryption using the same alghoritm. Does anyone have an idea for naming seemingly opposing expressions under one term?

I found a name for class that encodes and decodes a string of characters, ie. "codec" (COder-DECoder). I dont want to use the codec term for encryption operations if I already used it for character encoding.

Methods will be something like:

NameOfTheClass.Encrypt(string plainText);
NameOfTheClass.Decrypt(string cipherText);
like image 847
tu144 Avatar asked Sep 18 '11 08:09

tu144


1 Answers

Such classes are usually named after the cipher they implement. If you have a base class with virtual methods that will be implemented by several different cipher classes, that class usually has a name like BlockCipher or something, depending on exactly what you are doing with it.

like image 66
Omnifarious Avatar answered Oct 12 '22 13:10

Omnifarious