removing unused wallet files.

b=204184 p=mvl r=me sr=bryner


git-svn-id: svn://10.0.0.236/trunk@148526 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dwitte%stanford.edu
2003-10-30 03:18:10 +00:00
parent 5a3e11a293
commit 6422112f67
5 changed files with 0 additions and 351 deletions

View File

@@ -1,64 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* thayes@netscape.com
* dp@netscape.com
* sspitzer@netscape.com
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
[scriptable, uuid(746bdcde-1dd2-11b2-b114-bf359be651fd)]
interface nsIKeyedStreamGenerator: nsISupports {
/* information about what type of stream this generates */
readonly attribute string signature;
/* consumer will be a nsIPasswordSink for now, but not limited to that.
* Use NULL consumer to reset the KeyedStreamGenerator's state.
* Also it is understood that the KeyedStreamGenerator will hold
* only a weakreference to the consumer to avoid any circular depedencies.
*/
void setup(in unsigned long salt, in nsISupports consumer);
/* the "quality level" of this stream
* why a float? if we assign 1 and 2, what do we do when something comes
* along that is in between?
*/
readonly attribute float level;
/* get the byte at position "offset" in the stream */
octet getByte(in unsigned long offset);
};

View File

@@ -1,47 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* thayes@netscape.com
* dp@netscape.com
* sspitzer@netscape.com
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
[scriptable, uuid(576e715a-1dd2-11b2-80be-8c835a34d50b)]
interface nsIPasswordSink: nsISupports {
readonly attribute wstring password;
};

View File

@@ -1,115 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsBasicStreamGenerator.h"
#include "nsCRT.h"
const char * nsBasicStreamGenerator::mSignature = "Basic Keyed Stream Generator";
NS_IMPL_ISUPPORTS1(nsBasicStreamGenerator, nsIKeyedStreamGenerator)
nsBasicStreamGenerator::nsBasicStreamGenerator()
: mLevel(NS_SECURITY_LEVEL), mSalt(0), mPassword(), mState(0) {
}
nsBasicStreamGenerator::~nsBasicStreamGenerator() {
}
NS_IMETHODIMP nsBasicStreamGenerator::GetSignature(char **signature) {
NS_ENSURE_ARG_POINTER(signature);
*signature = nsCRT::strdup(mSignature);
return NS_OK;
}
NS_IMETHODIMP nsBasicStreamGenerator::Setup(PRUint32 salt, nsISupports *consumer) {
nsresult rv = NS_OK;
/* forget about previous setup */
mWeakPasswordSink = nsnull;
mPassword.Truncate(0);
/* reestablish setup */
if (consumer) {
mWeakPasswordSink = do_GetWeakReference(consumer, &rv);
if (NS_FAILED(rv)) return rv;
}
mSalt = salt;
return NS_OK;
}
NS_IMETHODIMP nsBasicStreamGenerator::GetLevel(float *aLevel) {
NS_ENSURE_ARG_POINTER(aLevel);
*aLevel = mLevel;
return NS_OK;
}
NS_IMETHODIMP nsBasicStreamGenerator::GetByte(PRUint32 offset, PRUint8 *retval) {
NS_ENSURE_ARG_POINTER(retval);
nsresult rv = NS_OK;
if (mPassword.IsEmpty()) {
/* this is the first time, so we need to get the password */
nsCOMPtr<nsIPasswordSink> weakPasswordSink = do_QueryReferent(mWeakPasswordSink);
if (!weakPasswordSink) {
return NS_ERROR_FAILURE;
}
PRUnichar *aPassword;
rv = weakPasswordSink->GetPassword(&aPassword);
if (NS_FAILED(rv)) {
return rv;
}
mPassword = aPassword;
nsMemory::Free(aPassword);
mState = 0;
}
/*
* Get the offset byte from the stream. Our stream is just our password
* repeating itself infinite times.
*
* Since mPassword is an nsString, its elements are PRUnichars.
* We want to return either the high-order or low-order 8 bits of the PRUnichar
* depending on whether or not this routine was called an odd or an even number of times
*/
PRUnichar ret16 = mPassword.CharAt((mState>>1) % mPassword.Length());
if (!((mState++) & 1)) {
ret16 = ret16>>8;
}
*retval = (PRUint8)(ret16 & 0xff);
return rv;
}

View File

@@ -1,73 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIKeyedStreamGenerator.h"
#include "nsIPasswordSink.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsIWeakReference.h"
#define NS_SECURITY_LEVEL 1.0
// {87496b68-1dd2-11b2-b080-ccabe9894783}
#define NS_BASIC_STREAM_GENERATOR_CID \
{ 0x87496b68, 0x1dd2, 0x11b2, { 0xb0, 0x80, 0xcc, 0xab, 0xe9, 0x89, 0x47, 0x83 } }
#define NS_BASIC_STREAM_GENERATOR_CONTRACTID "@mozilla.org/keyed-stream-generator/basic;1"
#define NS_BASIC_STREAM_GENERATOR_CLASSNAME "Basic Keyed Stream Generator"
class nsBasicStreamGenerator : public nsIKeyedStreamGenerator
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIKEYEDSTREAMGENERATOR
nsBasicStreamGenerator();
protected:
virtual ~nsBasicStreamGenerator();
private:
static const char *mSignature; /* read only */
float mLevel; /* read only */
PRUint32 mSalt; /* not used for now */
nsString mPassword;
nsCOMPtr<nsIWeakReference> mWeakPasswordSink; /* nsIPasswordSink */
PRInt32 mState;
};

View File

@@ -1,52 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// This header file just contains prototypes for the factory methods
// for "builtin" data sources that are included in walletlib.dll. Each of
// these data sources is exposed to the external world via its CID in
// ../include/nsIWalletService.h.
#ifndef nsBuiltinDataSources_h__
#define nsBuiltinDataSources_h__
//#include "nsError.h"
//class nsIWalletDataSource;
//class nsIWalletDataBase;
#endif // nsBuiltinDataSources_h__