diff options
author | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
commit | 420b91db29485df39fd6e724e782c449158811cb (patch) | |
tree | b471a94563af914d3ed3edd3e856d21cb1b69945 /indra/llmessage/llnullcipher.cpp |
Print done when done.
Diffstat (limited to 'indra/llmessage/llnullcipher.cpp')
-rw-r--r-- | indra/llmessage/llnullcipher.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/llmessage/llnullcipher.cpp b/indra/llmessage/llnullcipher.cpp new file mode 100644 index 0000000000..53bb748415 --- /dev/null +++ b/indra/llmessage/llnullcipher.cpp @@ -0,0 +1,40 @@ +/** + * @file llnullcipher.cpp + * @brief Implementation of a cipher which does not encrypt. + * + * Copyright (c) 2003-$CurrentYear$, Linden Research, Inc. + * $License$ + */ + +#include "linden_common.h" + +#include "llcrypto.h" + +///---------------------------------------------------------------------------- +/// Class LLNullCipher +///---------------------------------------------------------------------------- + +BOOL LLNullCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) +{ + if((src_len == dst_len) && src && dst) + { + memmove(dst, src, src_len); + return TRUE; + } + return FALSE; +} + +BOOL LLNullCipher::decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) +{ + if((src_len == dst_len) && src && dst) + { + memmove(dst, src, src_len); + return TRUE; + } + return FALSE; +} + +U32 LLNullCipher::requiredEncryptionSpace(U32 len) +{ + return len; +} |