Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a class that does encryption, decryption, hashing called?

I have a class that encrypts, decrypts, hashes and signs. In the future it may implement something else too, but my question is that what would that class be called. Currently I call it Encrypter, but it really does things that's not about encrypting. I have thought about the term Crypto, but I am not sure if that's what people usually use/think.

like image 985
Tower Avatar asked Feb 12 '26 17:02

Tower


1 Answers

It sounds like you might want to break up your single class into multiple classes, one for each major purpose:

  • encrypting
  • decrypting
  • hashing
  • signing
  • signature verification

Then you can collect these classes into a library or module (terminology depends on what language you're using).

like image 142
Greg Hewgill Avatar answered Feb 15 '26 18:02

Greg Hewgill



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!