aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/llblowfishcipher.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/llmessage/llblowfishcipher.h
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r--linden/indra/llmessage/llblowfishcipher.h (renamed from linden/indra/newview/lltexturebar.h)71
1 files changed, 27 insertions, 44 deletions
diff --git a/linden/indra/newview/lltexturebar.h b/linden/indra/llmessage/llblowfishcipher.h
index ea704a2..2557598 100644
--- a/linden/indra/newview/lltexturebar.h
+++ b/linden/indra/llmessage/llblowfishcipher.h
@@ -1,8 +1,11 @@
1/** 1/**
2 * @file lltexturebar.h 2 * @file llblowfishcipher.h
3 * @brief LLTextureBar class definition 3 * @brief A symmetric block cipher, designed in 1993 by Bruce Schneier.
4 * We use it because it has an 8 byte block size, allowing encryption of
5 * two UUIDs and a timestamp (16x2 + 4 = 36 bytes) with only 40 bytes of
6 * output. AES has a block size of 32 bytes, so this would require 64 bytes.
4 * 7 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 8 * Copyright (c) 2007-2007, Linden Research, Inc.
6 * 9 *
7 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 11 * to you under the terms of the GNU General Public License, version 2.0
@@ -25,51 +28,31 @@
25 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
26 */ 29 */
27 30
28#ifndef LL_LLTEXTUREBAR_H 31#ifndef LLBLOWFISHCIPHER_H
29#define LL_LLTEXTUREBAR_H 32#define LLBLOWFISHCIPHER_H
30 33
31#include "llview.h" 34#include "llcipher.h"
32#include "lltimer.h"
33#include "llviewerimage.h"
34 35
35class LLAssetInfo;
36class LLTimer;
37 36
38 37class LLBlowfishCipher : public LLCipher
39class LLTextureBar : public LLView
40{ 38{
41public: 39public:
42 LLPointer<LLViewerImage> mImagep; 40 // Secret may be up to 56 bytes in length per Blowfish spec.
43 S32 mHilite; 41 LLBlowfishCipher(const U8* secret, size_t secret_size);
44 42 virtual ~LLBlowfishCipher();
45public: 43
46 LLTextureBar(const std::string& name, const LLRect& r); 44 // See llcipher.h for documentation.
47 45 /*virtual*/ U32 encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len);
48 virtual EWidgetType getWidgetType() const; 46 /*virtual*/ U32 decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len);
49 virtual LLString getWidgetTag() const; 47 /*virtual*/ U32 requiredEncryptionSpace(U32 src_len) const;
50 48
51 virtual void draw(); 49#ifdef _DEBUG
52 50 static BOOL testHarness();
53 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); 51#endif
54 52
55 virtual LLRect getRequiredRect(); // Return the height of this object, given the set options. 53private:
56}; 54 U8* mSecret;
57 55 size_t mSecretSize;
58class LLGLTexMemBar : public LLView
59{
60public:
61 LLGLTexMemBar(const std::string& name);
62
63 virtual EWidgetType getWidgetType() const;
64 virtual LLString getWidgetTag() const;
65
66 virtual void draw();
67
68 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
69
70 virtual LLRect getRequiredRect(); // Return the height of this object, given the set options.
71
72protected:
73}; 56};
74 57
75#endif // LL_TEXTURE_BAR_ 58#endif // LL_LLCRYPTO_H