Archived Forum Post

Index of archived forum posts

Question:

Can you use strings instead of const char * in these C++ encryption examples?

Mar 12 '13 at 14:46

Hello. I was just wondering if it is advisable to use std::string instead of const char * in the many encryption code examples.

For example, in the SHA-1 hash alogorithm code (http://www.example-code.com/vcpp/crypt_hash_algorithms.asp) what effect would using strings instead of const char * have?

I'm new to C++ and encryption so patience please if the answer is blindingly obvious :D