code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/usr/bin/python # # Copyright (C) 2007 SIOS Technology, Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ [ 8, 0, 0.0323, 0.0019, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0361, 0.0019, 0, 0.66, 0.0256, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0418, 0.0019, 0, 0.66,...
[ "\"\"\"Contains objects used with Google Apps.\"\"\"", "__author__ = 'tmatsuo@sios.com (Takashi MATSUO)'", "import atom", "import gdata", "APPS_NAMESPACE = 'http://schemas.google.com/apps/2006'", "APPS_TEMPLATE = '{http://schemas.google.com/apps/2006}%s'", "class EmailList(atom.AtomBase):\n \"\"\"The G...
#!/usr/bin/python # # Copyright (C) 2008 Google # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[]
[]
#!/usr/bin/python # # Copyright (C) 2007 - 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ [ 1, 0, 0.0188, 0.001, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0198, 0.001, 0, 0.66, 0.0227, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.0209, 0.001, 0, 0.6...
[ "import cgi", "import math", "import random", "import re", "import time", "import types", "import urllib", "import atom.http_interface", "import atom.token_store", "import atom.url", "import gdata.oauth as oauth", "import gdata.oauth.rsa as oauth_rsa", "try:\n import gdata.tlslite.utils.key...
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0215, 0.0167, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0315, 0.0006, 0, 0.66, 0.013, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0321, 0.0006, 0, 0.66,...
[ "\"\"\"Provides auth related token classes and functions for Google Data APIs.\n\nToken classes represent a user's authorization of this app to access their\ndata. Usually these are not created directly but by a GDClient object.\n\nClientLoginToken\nAuthSubToken\nSecureAuthSubToken", "import datetime", "import ...
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.1073, 0.0729, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1538, 0.004, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.166, 0.004, 0, 0.66, 0...
[ "\"\"\"Provides HTTP functions for gdata.service to use on Google App Engine\n\nAppEngineHttpClient: Provides an HTTP request method which uses App Engine's\n urlfetch API. Set the http_client member of a GDataService object to an\n instance of an AppEngineHttpClient to allow the gdata library to run on\n Goo...
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0669, 0.0037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0818, 0.0037, 0, 0.66, 0.0714, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0855, 0.0037, 0, 0.66...
[ "\"\"\"Provides utility functions used with command line samples.\"\"\"", "import sys", "import getpass", "import urllib", "import gdata.gauth", "__author__ = 'j.s@google.com (Jeff Scudder)'", "CLIENT_LOGIN = 1", "AUTHSUB = 2", "OAUTH = 3", "HMAC = 1", "RSA = 2", "class SettingsUtil(object):\n...
#!/usr/bin/python # # Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.039, 0.0167, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.052, 0.0019, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0576, 0.0019, 0, 0.66, ...
[ "\"\"\"CalendarClient extends the GDataService to streamline Google Calendar operations.\n\n CalendarService: Provides methods to query feeds and manipulate items. Extends\n GDataService.\n\n DictionaryToParamList: Function which converts a dictionary into a list of\n URL ar...
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.055, 0.0031, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0642, 0.0031, 0, 0.66, 0.0185, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0734, 0.0031, 0, 0.66, ...
[ "\"\"\"Contains the data classes of the Google Calendar Data API\"\"\"", "__author__ = 'j.s@google.com (Jeff Scudder)'", "import atom.core", "import atom.data", "import gdata.acl.data", "import gdata.data", "import gdata.geo.data", "import gdata.opensearch.data", "GCAL_NAMESPACE = 'http://schemas.go...
#!/usr/bin/python # # Copyright (C) 2006 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.0172, 0.001, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0201, 0.001, 0, 0.66, 0.0159, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.0273, 0.0096, 0, 0.66, ...
[ "\"\"\"Contains extensions to ElementWrapper objects used with Google Calendar.\"\"\"", "__author__ = 'api.vli (Vivian Li), api.rboyd (Ryan Boyd)'", "try:\n from xml.etree import cElementTree as ElementTree\nexcept ImportError:\n try:\n import cElementTree as ElementTree\n except ImportError:\n try:\n ...
#!/usr/bin/python """ requires tlslite - http://trevp.net/tlslite/ """ import binascii try: from gdata.tlslite.utils import keyfactory except ImportError: from tlslite.tlslite.utils import keyfactory try: from gdata.tlslite.utils import cryptomath except ImportError: from tlslite.tlslite.utils import crypto...
[ [ 8, 0, 0.0357, 0.0317, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0635, 0.0079, 0, 0.66, 0.1667, 984, 0, 1, 0, 0, 984, 0, 0 ], [ 7, 0, 0.0913, 0.0317, 0, 0.66...
[ "\"\"\"\nrequires tlslite - http://trevp.net/tlslite/\n\n\"\"\"", "import binascii", "try:\n from gdata.tlslite.utils import keyfactory\nexcept ImportError:\n from tlslite.tlslite.utils import keyfactory", " from gdata.tlslite.utils import keyfactory", " from tlslite.tlslite.utils import keyfactory", ...
import cgi import urllib import time import random import urlparse import hmac import binascii VERSION = '1.0' # Hi Blaine! HTTP_METHOD = 'GET' SIGNATURE_METHOD = 'PLAINTEXT' # Generic exception class class OAuthError(RuntimeError): def __init__(self, message='OAuth error occured.'): self.m...
[ [ 1, 0, 0.0019, 0.0019, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0038, 0.0019, 0, 0.66, 0.0435, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0057, 0.0019, 0, ...
[ "import cgi", "import urllib", "import time", "import random", "import urlparse", "import hmac", "import binascii", "VERSION = '1.0' # Hi Blaine!", "HTTP_METHOD = 'GET'", "SIGNATURE_METHOD = 'PLAINTEXT'", "class OAuthError(RuntimeError):\n def __init__(self, message='OAuth error occured.'):\n...
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0189, 0.0041, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.023, 0.0008, 0, 0.66, 0.0061, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0254, 0.0008, 0, 0.66, ...
[ "\"\"\"Provides classes and constants for the XML in the Google Data namespace.\n\nDocumentation for the raw XML which these classes represent can be found here:\nhttp://code.google.com/apis/gdata/docs/2.0/elements.html\n\"\"\"", "__author__ = 'j.s@google.com (Jeff Scudder)'", "import os", "import atom.core",...
#!/usr/bin/env python # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.5897, 0.1282, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.7179, 0.0256, 0, 0.66, 0.25, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.7949, 0.0256, 0, 0.66, ...
[ "\"\"\"Provides a base class to represent property elements in feeds.\n\nThis module is used for version 2 of the Google Data APIs. The primary class\nin this module is AppsProperty.\n\"\"\"", "__author__ = 'Vic Fryzel <vicfryzel@google.com>'", "import atom.core", "import gdata.apps", "class AppsProperty(at...
#!/usr/bin/python # # Copyright (C) 2006 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.0234, 0.0048, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0287, 0.0012, 0, 0.66, 0.0213, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0311, 0.0012, 0, 0.66,...
[ "\"\"\"Contains classes representing Google Data elements.\n\n Extends Atom classes to add Google Data specific elements.\n\"\"\"", "__author__ = 'j.s@google.com (Jeffrey Scudder)'", "import os", "import atom", "try:\n from xml.etree import cElementTree as ElementTree\nexcept ImportError:\n try:\n imp...
#!/usr/bin/env python # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ [ 14, 0, 0.0753, 0.0036, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 8, 0, 0.1004, 0.0323, 0, 0.66, 0.1, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0.1398, 0.0323, 0, 0.66, ...
[ "__author__ = 'j.s@google.com (Jeff Scudder)'", "\"\"\"Provides classes and methods for working with JSON-C.\n\nThis module is experimental and subject to backwards incompatible changes.\n\n Jsonc: Class which represents JSON-C data and provides pythonic member\n access which is a bit cleaner than workin...
"""TLS Lite + xmlrpclib.""" import xmlrpclib import httplib from gdata.tlslite.integration.HTTPTLSConnection import HTTPTLSConnection from gdata.tlslite.integration.ClientHelper import ClientHelper class XMLRPCTransport(xmlrpclib.Transport, ClientHelper): """Handles an HTTPS transaction to an XML-RPC server.""" ...
[ [ 8, 0, 0.0073, 0.0073, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0219, 0.0073, 0, 0.66, 0.2, 251, 0, 1, 0, 0, 251, 0, 0 ], [ 1, 0, 0.0292, 0.0073, 0, 0.66, ...
[ "\"\"\"TLS Lite + xmlrpclib.\"\"\"", "import xmlrpclib", "import httplib", "from gdata.tlslite.integration.HTTPTLSConnection import HTTPTLSConnection", "from gdata.tlslite.integration.ClientHelper import ClientHelper", "class XMLRPCTransport(xmlrpclib.Transport, ClientHelper):\n \"\"\"Handles an HTTPS ...
"""TLS Lite + imaplib.""" import socket from imaplib import IMAP4 from gdata.tlslite.TLSConnection import TLSConnection from gdata.tlslite.integration.ClientHelper import ClientHelper # IMAP TLS PORT IMAP4_TLS_PORT = 993 class IMAP4_TLS(IMAP4, ClientHelper): """This class extends L{imaplib.IMAP4} with TLS suppor...
[ [ 8, 0, 0.0076, 0.0076, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0227, 0.0076, 0, 0.66, 0.1667, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 1, 0, 0.0303, 0.0076, 0, 0.66...
[ "\"\"\"TLS Lite + imaplib.\"\"\"", "import socket", "from imaplib import IMAP4", "from gdata.tlslite.TLSConnection import TLSConnection", "from gdata.tlslite.integration.ClientHelper import ClientHelper", "IMAP4_TLS_PORT = 993", "class IMAP4_TLS(IMAP4, ClientHelper):\n \"\"\"This class extends L{imap...
class IntegrationHelper: def __init__(self, username=None, password=None, sharedKey=None, certChain=None, privateKey=None, cryptoID=None, protocol=None, x509Fingerprint=None, x509TrustList=None, x509CommonName=None, setti...
[ [ 3, 0, 0.5192, 0.9808, 0, 0.66, 0, 128, 0, 1, 0, 0, 0, 0, 3 ], [ 2, 1, 0.5385, 0.9423, 1, 0.66, 0, 555, 0, 12, 0, 0, 0, 0, 3 ], [ 14, 2, 0.2308, 0.0192, 2, 0.07, ...
[ "class IntegrationHelper:\n\n def __init__(self,\n username=None, password=None, sharedKey=None,\n certChain=None, privateKey=None,\n cryptoID=None, protocol=None,\n x509Fingerprint=None,\n x509TrustList=None, x509CommonName=None,", " def __in...
"""TLS Lite + asyncore.""" import asyncore from gdata.tlslite.TLSConnection import TLSConnection from AsyncStateMachine import AsyncStateMachine class TLSAsyncDispatcherMixIn(AsyncStateMachine): """This class can be "mixed in" with an L{asyncore.dispatcher} to add TLS support. This class es...
[ [ 8, 0, 0.0072, 0.0072, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0288, 0.0072, 0, 0.66, 0.25, 563, 0, 1, 0, 0, 563, 0, 0 ], [ 1, 0, 0.036, 0.0072, 0, 0.66, ...
[ "\"\"\"TLS Lite + asyncore.\"\"\"", "import asyncore", "from gdata.tlslite.TLSConnection import TLSConnection", "from AsyncStateMachine import AsyncStateMachine", "class TLSAsyncDispatcherMixIn(AsyncStateMachine):\n \"\"\"This class can be \"mixed in\" with an\n L{asyncore.dispatcher} to add TLS suppo...
"""TLS Lite + SocketServer.""" from gdata.tlslite.TLSConnection import TLSConnection class TLSSocketServerMixIn: """ This class can be mixed in with any L{SocketServer.TCPServer} to add TLS support. To use this class, define a new class that inherits from it and some L{SocketServer.TCPServer} (wi...
[ [ 8, 0, 0.0169, 0.0169, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0508, 0.0169, 0, 0.66, 0.5, 891, 0, 1, 0, 0, 891, 0, 0 ], [ 3, 0, 0.5424, 0.9322, 0, 0.66, ...
[ "\"\"\"TLS Lite + SocketServer.\"\"\"", "from gdata.tlslite.TLSConnection import TLSConnection", "class TLSSocketServerMixIn:\n \"\"\"\n This class can be mixed in with any L{SocketServer.TCPServer} to\n add TLS support.\n\n To use this class, define a new class that inherits from it and\n some L...
"""TLS Lite + smtplib.""" from smtplib import SMTP from gdata.tlslite.TLSConnection import TLSConnection from gdata.tlslite.integration.ClientHelper import ClientHelper class SMTP_TLS(SMTP): """This class extends L{smtplib.SMTP} with TLS support.""" def starttls(self, username=None, password...
[ [ 8, 0, 0.0088, 0.0088, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0263, 0.0088, 0, 0.66, 0.25, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.0351, 0.0088, 0, 0.66, ...
[ "\"\"\"TLS Lite + smtplib.\"\"\"", "from smtplib import SMTP", "from gdata.tlslite.TLSConnection import TLSConnection", "from gdata.tlslite.integration.ClientHelper import ClientHelper", "class SMTP_TLS(SMTP):\n \"\"\"This class extends L{smtplib.SMTP} with TLS support.\"\"\"\n\n def starttls(self,\n ...
"""TLS Lite + httplib.""" import socket import httplib from gdata.tlslite.TLSConnection import TLSConnection from gdata.tlslite.integration.ClientHelper import ClientHelper class HTTPBaseTLSConnection(httplib.HTTPConnection): """This abstract class provides a framework for adding TLS support to httplib.""" ...
[ [ 8, 0, 0.0059, 0.0059, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0178, 0.0059, 0, 0.66, 0.1667, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 1, 0, 0.0237, 0.0059, 0, 0.66...
[ "\"\"\"TLS Lite + httplib.\"\"\"", "import socket", "import httplib", "from gdata.tlslite.TLSConnection import TLSConnection", "from gdata.tlslite.integration.ClientHelper import ClientHelper", "class HTTPBaseTLSConnection(httplib.HTTPConnection):\n \"\"\"This abstract class provides a framework for ad...
"""Classes for integrating TLS Lite with other packages.""" __all__ = ["AsyncStateMachine", "HTTPTLSConnection", "POP3_TLS", "IMAP4_TLS", "SMTP_TLS", "XMLRPCTransport", "TLSSocketServerMixIn", "TLSAsyncDispatcherMixIn", "TLSTwisted...
[ [ 8, 0, 0.0588, 0.0588, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4118, 0.5294, 0, 0.66, 0.5, 272, 0, 0, 0, 0, 0, 5, 0 ], [ 7, 0, 0.8824, 0.2941, 0, 0.66, ...
[ "\"\"\"Classes for integrating TLS Lite with other packages.\"\"\"", "__all__ = [\"AsyncStateMachine\",\n \"HTTPTLSConnection\",\n \"POP3_TLS\",\n \"IMAP4_TLS\",\n \"SMTP_TLS\",\n \"XMLRPCTransport\",\n \"TLSSocketServerMixIn\",\n \"TLSAsyncDis...
""" A state machine for using TLS Lite with asynchronous I/O. """ class AsyncStateMachine: """ This is an abstract class that's used to integrate TLS Lite with asyncore and Twisted. This class signals wantsReadsEvent() and wantsWriteEvent(). When the underlying socket has become readabl...
[ [ 8, 0, 0.0085, 0.0128, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.5085, 0.9787, 0, 0.66, 1, 226, 0, 19, 0, 0, 0, 0, 40 ], [ 8, 1, 0.0532, 0.0596, 1, 0.23, ...
[ "\"\"\"\nA state machine for using TLS Lite with asynchronous I/O.\n\"\"\"", "class AsyncStateMachine:\n \"\"\"\n This is an abstract class that's used to integrate TLS Lite with\n asyncore and Twisted.\n\n This class signals wantsReadsEvent() and wantsWriteEvent(). When\n the underlying socket ha...
""" A helper class for using TLS Lite with stdlib clients (httplib, xmlrpclib, imaplib, poplib). """ from gdata.tlslite.Checker import Checker class ClientHelper: """This is a helper class used to integrate TLS Lite with various TLS clients (e.g. poplib, smtplib, httplib, etc.)""" def __init__...
[ [ 8, 0, 0.0153, 0.0245, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0368, 0.0061, 0, 0.66, 0.5, 797, 0, 1, 0, 0, 797, 0, 0 ], [ 3, 0, 0.5245, 0.9571, 0, 0.66, ...
[ "\"\"\"\nA helper class for using TLS Lite with stdlib clients\n(httplib, xmlrpclib, imaplib, poplib).\n\"\"\"", "from gdata.tlslite.Checker import Checker", "class ClientHelper:\n \"\"\"This is a helper class used to integrate TLS Lite with various\n TLS clients (e.g. poplib, smtplib, httplib, etc.)\"\"\...
"""Class for caching TLS sessions.""" import thread import time class SessionCache: """This class is used by the server to cache TLS sessions. Caching sessions allows the client to use TLS session resumption and avoid the expense of a full handshake. To use this class, simply pass a SessionCache ins...
[ [ 8, 0, 0.0097, 0.0097, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0291, 0.0097, 0, 0.66, 0.2, 260, 0, 1, 0, 0, 260, 0, 0 ], [ 1, 0, 0.0388, 0.0097, 0, 0.66, ...
[ "\"\"\"Class for caching TLS sessions.\"\"\"", "import thread", "import time", "class SessionCache:\n \"\"\"This class is used by the server to cache TLS sessions.\n\n Caching sessions allows the client to use TLS session resumption\n and avoid the expense of a full handshake. To use this class,\n ...
"""Class representing a TLS session.""" from utils.compat import * from mathtls import * from constants import * class Session: """ This class represents a TLS session. TLS distinguishes between connections and sessions. A new handshake creates both a connection and a session. Data is transmitt...
[ [ 8, 0, 0.0076, 0.0076, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0229, 0.0076, 0, 0.66, 0.25, 664, 0, 1, 0, 0, 664, 0, 0 ], [ 1, 0, 0.0305, 0.0076, 0, 0.66, ...
[ "\"\"\"Class representing a TLS session.\"\"\"", "from utils.compat import *", "from mathtls import *", "from constants import *", "class Session:\n \"\"\"\n This class represents a TLS session.\n\n TLS distinguishes between connections and sessions. A new\n handshake creates both a connection ...
"""Base class for SharedKeyDB and VerifierDB.""" import anydbm import thread class BaseDB: def __init__(self, filename, type): self.type = type self.filename = filename if self.filename: self.db = None else: self.db = {} self.lock = thre...
[ [ 8, 0, 0.0083, 0.0083, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.025, 0.0083, 0, 0.66, 0.3333, 434, 0, 1, 0, 0, 434, 0, 0 ], [ 1, 0, 0.0333, 0.0083, 0, 0.66,...
[ "\"\"\"Base class for SharedKeyDB and VerifierDB.\"\"\"", "import anydbm", "import thread", "class BaseDB:\n def __init__(self, filename, type):\n self.type = type\n self.filename = filename\n if self.filename:\n self.db = None\n else:\n self.db = {}", " ...
"""Class for setting handshake parameters.""" from constants import CertificateType from utils import cryptomath from utils import cipherfactory class HandshakeSettings: """This class encapsulates various parameters that can be used with a TLS handshake. @sort: minKeySize, maxKeySize, cipherNames, certifi...
[ [ 8, 0, 0.0063, 0.0063, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0189, 0.0063, 0, 0.66, 0.25, 208, 0, 1, 0, 0, 208, 0, 0 ], [ 1, 0, 0.0252, 0.0063, 0, 0.66, ...
[ "\"\"\"Class for setting handshake parameters.\"\"\"", "from constants import CertificateType", "from utils import cryptomath", "from utils import cipherfactory", "class HandshakeSettings:\n \"\"\"This class encapsulates various parameters that can be used with\n a TLS handshake.\n @sort: minKeySiz...
"""Class for storing SRP password verifiers.""" from utils.cryptomath import * from utils.compat import * import mathtls from BaseDB import BaseDB class VerifierDB(BaseDB): """This class represent an in-memory or on-disk database of SRP password verifiers. A VerifierDB can be passed to a server handshake...
[ [ 8, 0, 0.0111, 0.0111, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0333, 0.0111, 0, 0.66, 0.2, 712, 0, 1, 0, 0, 712, 0, 0 ], [ 1, 0, 0.0444, 0.0111, 0, 0.66, ...
[ "\"\"\"Class for storing SRP password verifiers.\"\"\"", "from utils.cryptomath import *", "from utils.compat import *", "import mathtls", "from BaseDB import BaseDB", "class VerifierDB(BaseDB):\n \"\"\"This class represent an in-memory or on-disk database of SRP\n password verifiers.\n\n A Verif...
"""Miscellaneous helper functions.""" from utils.compat import * from utils.cryptomath import * import hmac import md5 import sha #1024, 1536, 2048, 3072, 4096, 6144, and 8192 bit groups] goodGroupParameters = [(2,0xEEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D...
[ [ 8, 0, 0.0059, 0.0059, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0176, 0.0059, 0, 0.66, 0.0625, 664, 0, 1, 0, 0, 664, 0, 0 ], [ 1, 0, 0.0235, 0.0059, 0, 0.66...
[ "\"\"\"Miscellaneous helper functions.\"\"\"", "from utils.compat import *", "from utils.cryptomath import *", "import hmac", "import md5", "import sha", "goodGroupParameters = [(2,0xEEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D8E250B98BE48E495C1D6...
"""Class returned by TLSConnection.makefile().""" class FileObject: """This class provides a file object interface to a L{tlslite.TLSConnection.TLSConnection}. Call makefile() on a TLSConnection to create a FileObject instance. This class was copied, with minor modifications, from the _fileobject...
[ [ 8, 0, 0.0045, 0.0045, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.5068, 0.9909, 0, 0.66, 1, 429, 0, 13, 0, 0, 0, 0, 47 ], [ 8, 1, 0.0341, 0.0364, 1, 0.15, ...
[ "\"\"\"Class returned by TLSConnection.makefile().\"\"\"", "class FileObject:\n \"\"\"This class provides a file object interface to a\n L{tlslite.TLSConnection.TLSConnection}.\n\n Call makefile() on a TLSConnection to create a FileObject instance.\n\n This class was copied, with minor modifications, ...
"""Constants used in various places.""" class CertificateType: x509 = 0 openpgp = 1 cryptoID = 2 class HandshakeType: hello_request = 0 client_hello = 1 server_hello = 2 certificate = 11 server_key_exchange = 12 certificate_request = 13 server_hello_done = 14 certificate_ve...
[ [ 8, 0, 0.0044, 0.0044, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.02, 0.0178, 0, 0.66, 0.1429, 528, 0, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.0178, 0.0044, 1, 0.29, ...
[ "\"\"\"Constants used in various places.\"\"\"", "class CertificateType:\n x509 = 0\n openpgp = 1\n cryptoID = 2", " x509 = 0", " openpgp = 1", " cryptoID = 2", "class HandshakeType:\n hello_request = 0\n client_hello = 1\n server_hello = 2\n certificate = 11\n server_key_...
""" TLS Lite is a free python library that implements SSL v3, TLS v1, and TLS v1.1. TLS Lite supports non-traditional authentication methods such as SRP, shared keys, and cryptoIDs, in addition to X.509 certificates. TLS Lite is pure python, however it can access OpenSSL, cryptlib, pycrypto, and GMPY for faster crypt...
[ [ 8, 0, 0.2436, 0.4615, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4872, 0.0256, 0, 0.66, 0.5, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.7692, 0.4872, 0, 0.66, ...
[ "\"\"\"\nTLS Lite is a free python library that implements SSL v3, TLS v1, and\nTLS v1.1. TLS Lite supports non-traditional authentication methods\nsuch as SRP, shared keys, and cryptoIDs, in addition to X.509\ncertificates. TLS Lite is pure python, however it can access OpenSSL,\ncryptlib, pycrypto, and GMPY for...
"""Import this module for easy access to TLS Lite objects. The TLS Lite API consists of classes, functions, and variables spread throughout this package. Instead of importing them individually with:: from tlslite.TLSConnection import TLSConnection from tlslite.HandshakeSettings import HandshakeSettings f...
[ [ 8, 0, 0.3, 0.5867, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6133, 0.0133, 0, 0.66, 0.0476, 208, 0, 3, 0, 0, 208, 0, 0 ], [ 1, 0, 0.6267, 0.0133, 0, 0.66, ...
[ "\"\"\"Import this module for easy access to TLS Lite objects.\n\nThe TLS Lite API consists of classes, functions, and variables spread\nthroughout this package. Instead of importing them individually with::\n\n from tlslite.TLSConnection import TLSConnection\n from tlslite.HandshakeSettings import Handshake...
"""Class for post-handshake certificate checking.""" from utils.cryptomath import hashAndBase64 from X509 import X509 from X509CertChain import X509CertChain from errors import * class Checker: """This class is passed to a handshake function to check the other party's certificate chain. If a handshake f...
[ [ 8, 0, 0.0068, 0.0068, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0205, 0.0068, 0, 0.66, 0.2, 712, 0, 1, 0, 0, 712, 0, 0 ], [ 1, 0, 0.0274, 0.0068, 0, 0.66, ...
[ "\"\"\"Class for post-handshake certificate checking.\"\"\"", "from utils.cryptomath import hashAndBase64", "from X509 import X509", "from X509CertChain import X509CertChain", "from errors import *", "class Checker:\n \"\"\"This class is passed to a handshake function to check the other\n party's ce...
"""OpenSSL/M2Crypto 3DES implementation.""" from cryptomath import * from TripleDES import * if m2cryptoLoaded: def new(key, mode, IV): return OpenSSL_TripleDES(key, mode, IV) class OpenSSL_TripleDES(TripleDES): def __init__(self, key, mode, IV): TripleDES.__init__(self, key, mo...
[ [ 8, 0, 0.0227, 0.0227, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0682, 0.0227, 0, 0.66, 0.3333, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.0909, 0.0227, 0, 0.66...
[ "\"\"\"OpenSSL/M2Crypto 3DES implementation.\"\"\"", "from cryptomath import *", "from TripleDES import *", "if m2cryptoLoaded:\n\n def new(key, mode, IV):\n return OpenSSL_TripleDES(key, mode, IV)\n\n class OpenSSL_TripleDES(TripleDES):\n\n def __init__(self, key, mode, IV):", " def ...
"""Cryptlib AES implementation.""" from cryptomath import * from AES import * if cryptlibpyLoaded: def new(key, mode, IV): return Cryptlib_AES(key, mode, IV) class Cryptlib_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "cryptlib") sel...
[ [ 8, 0, 0.0294, 0.0294, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0882, 0.0294, 0, 0.66, 0.3333, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.1176, 0.0294, 0, 0.66...
[ "\"\"\"Cryptlib AES implementation.\"\"\"", "from cryptomath import *", "from AES import *", "if cryptlibpyLoaded:\n\n def new(key, mode, IV):\n return Cryptlib_AES(key, mode, IV)\n\n class Cryptlib_AES(AES):\n\n def __init__(self, key, mode, IV):", " def new(key, mode, IV):\n ...
"""Factory functions for asymmetric cryptography. @sort: generateRSAKey, parseXMLKey, parsePEMKey, parseAsPublicKey, parseAsPrivateKey """ from compat import * from RSAKey import RSAKey from Python_RSAKey import Python_RSAKey import cryptomath if cryptomath.m2cryptoLoaded: from OpenSSL_RSAKey import OpenSSL_RSAK...
[ [ 8, 0, 0.0103, 0.0165, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0247, 0.0041, 0, 0.66, 0.0625, 238, 0, 1, 0, 0, 238, 0, 0 ], [ 1, 0, 0.0329, 0.0041, 0, 0.66...
[ "\"\"\"Factory functions for asymmetric cryptography.\n@sort: generateRSAKey, parseXMLKey, parsePEMKey, parseAsPublicKey,\nparseAsPrivateKey\n\"\"\"", "from compat import *", "from RSAKey import RSAKey", "from Python_RSAKey import Python_RSAKey", "import cryptomath", "if cryptomath.m2cryptoLoaded:\n fr...
"""Abstract class for RC4.""" from compat import * #For False class RC4: def __init__(self, keyBytes, implementation): if len(keyBytes) < 16 or len(keyBytes) > 256: raise ValueError() self.isBlockCipher = False self.name = "rc4" self.implementation = implementation ...
[ [ 8, 0, 0.0588, 0.0588, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1765, 0.0588, 0, 0.66, 0.5, 238, 0, 1, 0, 0, 238, 0, 0 ], [ 3, 0, 0.6471, 0.7647, 0, 0.66, ...
[ "\"\"\"Abstract class for RC4.\"\"\"", "from compat import * #For False", "class RC4:\n def __init__(self, keyBytes, implementation):\n if len(keyBytes) < 16 or len(keyBytes) > 256:\n raise ValueError()\n self.isBlockCipher = False\n self.name = \"rc4\"\n self.implement...
"""Abstract class for RSA.""" from cryptomath import * class RSAKey: """This is an abstract base class for RSA keys. Particular implementations of RSA keys, such as L{OpenSSL_RSAKey.OpenSSL_RSAKey}, L{Python_RSAKey.Python_RSAKey}, and L{PyCrypto_RSAKey.PyCrypto_RSAKey}, inherit from this. ...
[ [ 8, 0, 0.0038, 0.0038, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0114, 0.0038, 0, 0.66, 0.5, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 3, 0, 0.5114, 0.9811, 0, 0.66, ...
[ "\"\"\"Abstract class for RSA.\"\"\"", "from cryptomath import *", "class RSAKey:\n \"\"\"This is an abstract base class for RSA keys.\n\n Particular implementations of RSA keys, such as\n L{OpenSSL_RSAKey.OpenSSL_RSAKey},\n L{Python_RSAKey.Python_RSAKey}, and\n L{PyCrypto_RSAKey.PyCrypto_RSAKey}...
"""Classes for reading/writing binary data (such as TLS records).""" from compat import * class Writer: def __init__(self, length=0): #If length is zero, then this is just a "trial run" to determine length self.index = 0 self.bytes = createByteArrayZeros(length) def add(self, x, lengt...
[ [ 8, 0, 0.0106, 0.0106, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0319, 0.0106, 0, 0.66, 0.3333, 238, 0, 1, 0, 0, 238, 0, 0 ], [ 3, 0, 0.2021, 0.3085, 0, 0.66...
[ "\"\"\"Classes for reading/writing binary data (such as TLS records).\"\"\"", "from compat import *", "class Writer:\n def __init__(self, length=0):\n #If length is zero, then this is just a \"trial run\" to determine length\n self.index = 0\n self.bytes = createByteArrayZeros(length)\n\...
"""PyCrypto RC4 implementation.""" from cryptomath import * from RC4 import * if pycryptoLoaded: import Crypto.Cipher.ARC4 def new(key): return PyCrypto_RC4(key) class PyCrypto_RC4(RC4): def __init__(self, key): RC4.__init__(self, key, "pycrypto") self.context = ...
[ [ 8, 0, 0.0455, 0.0455, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1364, 0.0455, 0, 0.66, 0.3333, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.1818, 0.0455, 0, 0.66...
[ "\"\"\"PyCrypto RC4 implementation.\"\"\"", "from cryptomath import *", "from RC4 import *", "if pycryptoLoaded:\n import Crypto.Cipher.ARC4\n\n def new(key):\n return PyCrypto_RC4(key)\n\n class PyCrypto_RC4(RC4):", " import Crypto.Cipher.ARC4", " def new(key):\n return PyCry...
"""Factory functions for symmetric cryptography.""" import os import Python_AES import Python_RC4 import cryptomath tripleDESPresent = False if cryptomath.m2cryptoLoaded: import OpenSSL_AES import OpenSSL_RC4 import OpenSSL_TripleDES tripleDESPresent = True if cryptomath.cryptlibpyLoaded: impo...
[ [ 8, 0, 0.009, 0.009, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.027, 0.009, 0, 0.66, 0.0909, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.045, 0.009, 0, 0.66, ...
[ "\"\"\"Factory functions for symmetric cryptography.\"\"\"", "import os", "import Python_AES", "import Python_RC4", "import cryptomath", "tripleDESPresent = False", "if cryptomath.m2cryptoLoaded:\n import OpenSSL_AES\n import OpenSSL_RC4\n import OpenSSL_TripleDES\n tripleDESPresent = True",...
"""Class for parsing ASN.1""" from compat import * from codec import * #Takes a byte array which has a DER TLV field at its head class ASN1Parser: def __init__(self, bytes): p = Parser(bytes) p.get(1) #skip Type #Get Length self.length = self._getASN1Length(p) #Get Value ...
[ [ 8, 0, 0.0294, 0.0294, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0588, 0.0294, 0, 0.66, 0.3333, 238, 0, 1, 0, 0, 238, 0, 0 ], [ 1, 0, 0.0882, 0.0294, 0, 0.66...
[ "\"\"\"Class for parsing ASN.1\"\"\"", "from compat import *", "from codec import *", "class ASN1Parser:\n def __init__(self, bytes):\n p = Parser(bytes)\n p.get(1) #skip Type\n\n #Get Length\n self.length = self._getASN1Length(p)", " def __init__(self, bytes):\n p =...
"""Abstract class for 3DES.""" from compat import * #For True class TripleDES: def __init__(self, key, mode, IV, implementation): if len(key) != 24: raise ValueError() if mode != 2: raise ValueError() if len(IV) != 8: raise ValueError() self.isBl...
[ [ 8, 0, 0.0385, 0.0385, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1154, 0.0385, 0, 0.66, 0.5, 238, 0, 1, 0, 0, 238, 0, 0 ], [ 3, 0, 0.5962, 0.8462, 0, 0.66, ...
[ "\"\"\"Abstract class for 3DES.\"\"\"", "from compat import * #For True", "class TripleDES:\n def __init__(self, key, mode, IV, implementation):\n if len(key) != 24:\n raise ValueError()\n if mode != 2:\n raise ValueError()\n if len(IV) != 8:\n raise Valu...
"""Abstract class for AES.""" class AES: def __init__(self, key, mode, IV, implementation): if len(key) not in (16, 24, 32): raise AssertionError() if mode != 2: raise AssertionError() if len(IV) != 16: raise AssertionError() self.isBlockCipher = ...
[ [ 8, 0, 0.0323, 0.0323, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.5484, 0.9355, 0, 0.66, 1, 859, 0, 3, 0, 0, 0, 0, 11 ], [ 2, 1, 0.4032, 0.5806, 1, 0.52, ...
[ "\"\"\"Abstract class for AES.\"\"\"", "class AES:\n def __init__(self, key, mode, IV, implementation):\n if len(key) not in (16, 24, 32):\n raise AssertionError()\n if mode != 2:\n raise AssertionError()\n if len(IV) != 16:\n raise AssertionError()", " ...
"""Pure-Python RC4 implementation.""" from RC4 import RC4 from cryptomath import * def new(key): return Python_RC4(key) class Python_RC4(RC4): def __init__(self, key): RC4.__init__(self, key, "python") keyBytes = stringToBytes(key) S = [i for i in range(256)] j = 0 for...
[ [ 8, 0, 0.0256, 0.0256, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0769, 0.0256, 0, 0.66, 0.25, 653, 0, 1, 0, 0, 653, 0, 0 ], [ 1, 0, 0.1026, 0.0256, 0, 0.66, ...
[ "\"\"\"Pure-Python RC4 implementation.\"\"\"", "from RC4 import RC4", "from cryptomath import *", "def new(key):\n return Python_RC4(key)", " return Python_RC4(key)", "class Python_RC4(RC4):\n def __init__(self, key):\n RC4.__init__(self, key, \"python\")\n keyBytes = stringToBytes(...
"""PyCrypto RSA implementation.""" from cryptomath import * from RSAKey import * from Python_RSAKey import Python_RSAKey if pycryptoLoaded: from Crypto.PublicKey import RSA class PyCrypto_RSAKey(RSAKey): def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0): if not d: ...
[ [ 8, 0, 0.0164, 0.0164, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0492, 0.0164, 0, 0.66, 0.25, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.082, 0.0164, 0, 0.66, ...
[ "\"\"\"PyCrypto RSA implementation.\"\"\"", "from cryptomath import *", "from RSAKey import *", "from Python_RSAKey import Python_RSAKey", "if pycryptoLoaded:\n\n from Crypto.PublicKey import RSA\n\n class PyCrypto_RSAKey(RSAKey):\n def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0...
""" A pure python (slow) implementation of rijndael with a decent interface To include - from rijndael import rijndael To do a key setup - r = rijndael(key, block_size = 16) key must be a string of length 16, 24, or 32 blocksize must be 16, 24, or 32. Default is 16 To use - ciphertext = r.encrypt(plaintext) plai...
[ [ 8, 0, 0.0281, 0.0536, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.074, 0.0026, 0, 0.66, 0.0208, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.0765, 0.0026, 0, 0.66,...
[ "\"\"\"\nA pure python (slow) implementation of rijndael with a decent interface\n\nTo include -\n\nfrom rijndael import rijndael\n\nTo do a key setup -", "import copy", "import string", "import os", "if os.name != \"java\":\n import exceptions\n if hasattr(exceptions, \"FutureWarning\"):\n imp...
"""OpenSSL/M2Crypto RSA implementation.""" from cryptomath import * from RSAKey import * from Python_RSAKey import Python_RSAKey #copied from M2Crypto.util.py, so when we load the local copy of m2 #we can still use it def password_callback(v, prompt1='Enter private key passphrase:', prompt...
[ [ 8, 0, 0.0068, 0.0068, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0203, 0.0068, 0, 0.66, 0.2, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.0338, 0.0068, 0, 0.66, ...
[ "\"\"\"OpenSSL/M2Crypto RSA implementation.\"\"\"", "from cryptomath import *", "from RSAKey import *", "from Python_RSAKey import Python_RSAKey", "def password_callback(v, prompt1='Enter private key passphrase:',\n prompt2='Verify passphrase:'):\n from getpass import getpass\n ...
"""OpenSSL/M2Crypto RC4 implementation.""" from cryptomath import * from RC4 import RC4 if m2cryptoLoaded: def new(key): return OpenSSL_RC4(key) class OpenSSL_RC4(RC4): def __init__(self, key): RC4.__init__(self, key, "openssl") self.rc4 = m2.rc4_new() m2...
[ [ 8, 0, 0.04, 0.04, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.12, 0.04, 0, 0.66, 0.3333, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.16, 0.04, 0, 0.66, 0.6667...
[ "\"\"\"OpenSSL/M2Crypto RC4 implementation.\"\"\"", "from cryptomath import *", "from RC4 import RC4", "if m2cryptoLoaded:\n\n def new(key):\n return OpenSSL_RC4(key)\n\n class OpenSSL_RC4(RC4):\n\n def __init__(self, key):", " def new(key):\n return OpenSSL_RC4(key)", " ...
"""PyCrypto AES implementation.""" from cryptomath import * from AES import * if pycryptoLoaded: import Crypto.Cipher.AES def new(key, mode, IV): return PyCrypto_AES(key, mode, IV) class PyCrypto_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, ...
[ [ 8, 0, 0.0455, 0.0455, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1364, 0.0455, 0, 0.66, 0.3333, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.1818, 0.0455, 0, 0.66...
[ "\"\"\"PyCrypto AES implementation.\"\"\"", "from cryptomath import *", "from AES import *", "if pycryptoLoaded:\n import Crypto.Cipher.AES\n\n def new(key, mode, IV):\n return PyCrypto_AES(key, mode, IV)\n\n class PyCrypto_AES(AES):", " import Crypto.Cipher.AES", " def new(key, mode...
"""Cryptlib 3DES implementation.""" from cryptomath import * from TripleDES import * if cryptlibpyLoaded: def new(key, mode, IV): return Cryptlib_TripleDES(key, mode, IV) class Cryptlib_TripleDES(TripleDES): def __init__(self, key, mode, IV): TripleDES.__init__(self, key, mode,...
[ [ 8, 0, 0.0286, 0.0286, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0857, 0.0286, 0, 0.66, 0.3333, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.1429, 0.0286, 0, 0.66...
[ "\"\"\"Cryptlib 3DES implementation.\"\"\"", "from cryptomath import *", "from TripleDES import *", "if cryptlibpyLoaded:\n\n def new(key, mode, IV):\n return Cryptlib_TripleDES(key, mode, IV)\n\n class Cryptlib_TripleDES(TripleDES):\n\n def __init__(self, key, mode, IV):", " def new(...
"""Cryptlib RC4 implementation.""" from cryptomath import * from RC4 import RC4 if cryptlibpyLoaded: def new(key): return Cryptlib_RC4(key) class Cryptlib_RC4(RC4): def __init__(self, key): RC4.__init__(self, key, "cryptlib") self.context = cryptlib_py.cryptCreateCon...
[ [ 8, 0, 0.0357, 0.0357, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1071, 0.0357, 0, 0.66, 0.3333, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.1429, 0.0357, 0, 0.66...
[ "\"\"\"Cryptlib RC4 implementation.\"\"\"", "from cryptomath import *", "from RC4 import RC4", "if cryptlibpyLoaded:\n\n def new(key):\n return Cryptlib_RC4(key)\n\n class Cryptlib_RC4(RC4):\n\n def __init__(self, key):", " def new(key):\n return Cryptlib_RC4(key)", " ...
"""Toolkit for crypto and other stuff.""" __all__ = ["AES", "ASN1Parser", "cipherfactory", "codec", "Cryptlib_AES", "Cryptlib_RC4", "Cryptlib_TripleDES", "cryptomath: cryptomath module", "dateFuncs", "hmac", "...
[ [ 8, 0, 0.0323, 0.0323, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5484, 0.9355, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "\"\"\"Toolkit for crypto and other stuff.\"\"\"", "__all__ = [\"AES\",\n \"ASN1Parser\",\n \"cipherfactory\",\n \"codec\",\n \"Cryptlib_AES\",\n \"Cryptlib_RC4\",\n \"Cryptlib_TripleDES\",\n \"cryptomath: cryptomath module\"," ]
"""PyCrypto 3DES implementation.""" from cryptomath import * from TripleDES import * if pycryptoLoaded: import Crypto.Cipher.DES3 def new(key, mode, IV): return PyCrypto_TripleDES(key, mode, IV) class PyCrypto_TripleDES(TripleDES): def __init__(self, key, mode, IV): TripleDE...
[ [ 8, 0, 0.0455, 0.0455, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1364, 0.0455, 0, 0.66, 0.3333, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.1818, 0.0455, 0, 0.66...
[ "\"\"\"PyCrypto 3DES implementation.\"\"\"", "from cryptomath import *", "from TripleDES import *", "if pycryptoLoaded:\n import Crypto.Cipher.DES3\n\n def new(key, mode, IV):\n return PyCrypto_TripleDES(key, mode, IV)\n\n class PyCrypto_TripleDES(TripleDES):", " import Crypto.Cipher.DES3...
"""OpenSSL/M2Crypto AES implementation.""" from cryptomath import * from AES import * if m2cryptoLoaded: def new(key, mode, IV): return OpenSSL_AES(key, mode, IV) class OpenSSL_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "openssl") ...
[ [ 8, 0, 0.0204, 0.0204, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0612, 0.0204, 0, 0.66, 0.3333, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.0816, 0.0204, 0, 0.66...
[ "\"\"\"OpenSSL/M2Crypto AES implementation.\"\"\"", "from cryptomath import *", "from AES import *", "if m2cryptoLoaded:\n\n def new(key, mode, IV):\n return OpenSSL_AES(key, mode, IV)\n\n class OpenSSL_AES(AES):\n\n def __init__(self, key, mode, IV):", " def new(key, mode, IV):\n ...
"""Pure-Python AES implementation.""" from cryptomath import * from AES import * from rijndael import rijndael def new(key, mode, IV): return Python_AES(key, mode, IV) class Python_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "python") self.rijndael = rijnda...
[ [ 8, 0, 0.0147, 0.0147, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0441, 0.0147, 0, 0.66, 0.2, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.0735, 0.0147, 0, 0.66, ...
[ "\"\"\"Pure-Python AES implementation.\"\"\"", "from cryptomath import *", "from AES import *", "from rijndael import rijndael", "def new(key, mode, IV):\n return Python_AES(key, mode, IV)", " return Python_AES(key, mode, IV)", "class Python_AES(AES):\n def __init__(self, key, mode, IV):\n ...
import os #Functions for manipulating datetime objects #CCYY-MM-DDThh:mm:ssZ def parseDateClass(s): year, month, day = s.split("-") day, tail = day[:2], day[2:] hour, minute, second = tail[1:].split(":") second = second[:2] year, month, day = int(year), int(month), int(day) hour, minute, secon...
[ [ 1, 0, 0.0267, 0.0133, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 2, 0, 0.1267, 0.1067, 0, 0.66, 0.5, 819, 0, 1, 1, 0, 0, 0, 9 ], [ 14, 1, 0.0933, 0.0133, 1, 0.1,...
[ "import os", "def parseDateClass(s):\n year, month, day = s.split(\"-\")\n day, tail = day[:2], day[2:]\n hour, minute, second = tail[1:].split(\":\")\n second = second[:2]\n year, month, day = int(year), int(month), int(day)\n hour, minute, second = int(hour), int(minute), int(second)\n retu...
"""Miscellaneous functions to mask Python version differences.""" import sys import os if sys.version_info < (2,2): raise AssertionError("Python 2.2 or later required") if sys.version_info < (2,3): def enumerate(collection): return zip(range(len(collection)), collection) class Set: def ...
[ [ 8, 0, 0.0072, 0.0072, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0216, 0.0072, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0288, 0.0072, 0, 0.66, ...
[ "\"\"\"Miscellaneous functions to mask Python version differences.\"\"\"", "import sys", "import os", "if sys.version_info < (2,2):\n raise AssertionError(\"Python 2.2 or later required\")", "if sys.version_info < (2,3):\n\n def enumerate(collection):\n return zip(range(len(collection)), collec...
"""HMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104. (This file is modified from the standard library version to do faster copying) """ def _strxor(s1, s2): """Utility method. XOR the two strings s1 and s2 (must have same length). """ r...
[ [ 8, 0, 0.0385, 0.0673, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 0.101, 0.0385, 0, 0.66, 0.25, 745, 0, 2, 1, 0, 0, 0, 5 ], [ 8, 1, 0.101, 0.0192, 1, 0.46, ...
[ "\"\"\"HMAC (Keyed-Hashing for Message Authentication) Python module.\n\nImplements the HMAC algorithm as described by RFC 2104.\n\n(This file is modified from the standard library version to do faster\ncopying)\n\"\"\"", "def _strxor(s1, s2):\n \"\"\"Utility method. XOR the two strings s1 and s2 (must have sa...
"""Pure-Python RSA implementation.""" from cryptomath import * import xmltools from ASN1Parser import ASN1Parser from RSAKey import * class Python_RSAKey(RSAKey): def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0): if (n and not e) or (e and not n): raise AssertionError() ...
[ [ 8, 0, 0.0048, 0.0048, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0144, 0.0048, 0, 0.66, 0.2, 373, 0, 1, 0, 0, 373, 0, 0 ], [ 1, 0, 0.0192, 0.0048, 0, 0.66, ...
[ "\"\"\"Pure-Python RSA implementation.\"\"\"", "from cryptomath import *", "import xmltools", "from ASN1Parser import ASN1Parser", "from RSAKey import *", "class Python_RSAKey(RSAKey):\n def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0):\n if (n and not e) or (e and not n):\n ...
"""Exception classes. @sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert, TLSAuthenticationError, TLSNoAuthenticationError, TLSAuthenticationTypeError, TLSFingerprintError, TLSAuthorizationError, TLSValidationError, TLSFaultError """ from constants import AlertDescription, AlertLevel class ...
[ [ 8, 0, 0.0201, 0.0336, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.047, 0.0067, 0, 0.66, 0.0769, 208, 0, 2, 0, 0, 208, 0, 0 ], [ 3, 0, 0.0671, 0.0201, 0, 0.66,...
[ "\"\"\"Exception classes.\n@sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert,\nTLSAuthenticationError, TLSNoAuthenticationError, TLSAuthenticationTypeError,\nTLSFingerprintError, TLSAuthorizationError, TLSValidationError, TLSFaultError\n\"\"\"", "from constants import AlertDescription,...
"""Class for storing shared keys.""" from utils.cryptomath import * from utils.compat import * from mathtls import * from Session import Session from BaseDB import BaseDB class SharedKeyDB(BaseDB): """This class represent an in-memory or on-disk database of shared keys. A SharedKeyDB can be passed to a s...
[ [ 8, 0, 0.0172, 0.0172, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0517, 0.0172, 0, 0.66, 0.1667, 712, 0, 1, 0, 0, 712, 0, 0 ], [ 1, 0, 0.069, 0.0172, 0, 0.66,...
[ "\"\"\"Class for storing shared keys.\"\"\"", "from utils.cryptomath import *", "from utils.compat import *", "from mathtls import *", "from Session import Session", "from BaseDB import BaseDB", "class SharedKeyDB(BaseDB):\n \"\"\"This class represent an in-memory or on-disk database of shared\n k...
# -*- coding: utf-8 -*- """ Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0399, 0.0716, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0826, 0.0028, 0, 0.66, 0.1111, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0854, 0.0028, 0, 0.66...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
import Cookie import os from common.appengine_utilities import sessions class SessionMiddleware(object): TEST_COOKIE_NAME = 'testcookie' TEST_COOKIE_VALUE = 'worked' def process_request(self, request): """ Check to see if a valid session token exists, if not, then use a cookie on...
[ [ 1, 0, 0.0147, 0.0147, 0, 0.66, 0, 32, 0, 1, 0, 0, 32, 0, 0 ], [ 1, 0, 0.0294, 0.0147, 0, 0.66, 0.3333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0588, 0.0147, 0, 0....
[ "import Cookie", "import os", "from common.appengine_utilities import sessions", "class SessionMiddleware(object):\n TEST_COOKIE_NAME = 'testcookie'\n TEST_COOKIE_VALUE = 'worked'\n\n def process_request(self, request):\n \"\"\"\n Check to see if a valid session token exists, if not,\n ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1007, 0.194, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.209, 0.0075, 0, 0.66, 0.2, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.2164, 0.0075, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1134, 0.2185, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2269, 0.0084, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 3, 0, 0.6092, 0.7227, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1038, 0.2, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2154, 0.0077, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2231, 0.0077, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
''' Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
[ [ 8, 0, 0.12, 0.22, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.26, 0.02, 0, 0.66, 0.1, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 1, 0, 0.28, 0.02, 0, 0.66, 0.2, ...
[ "'''\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\nRedistributions of source code must retain the above copyright notice, this list of condition...
#!/usr/bin/python2.4 # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required ...
[ [ 8, 0, 0.0771, 0.0167, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0917, 0.0042, 0, 0.66, 0.0417, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1, 0.0042, 0, 0.66, ...
[ "\"\"\"Google Apps marketplace sample app.\n\nDemonstartes how to use provisoining data in marketplace apps.\n\"\"\"", "__author__ = 'Gunjan Sharma <gunjansharma@google.com>'", "import logging", "import os", "import re", "import urllib", "from urlparse import urlparse", "from django.utils import simpl...
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ [ 14, 0, 0.4884, 0.0233, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.5581, 0.0233, 0, 0.66, 0.3333, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 3, 0, 0.7442, 0.2558, 0, 0...
[ "__author__ = 'j.s@google.com (Jeff Scudder)'", "import base64", "class BasicAuth(object):\n \"\"\"Sets the Authorization header as defined in RFC1945\"\"\"\n\n def __init__(self, user_id, password):\n self.basic_cookie = base64.encodestring(\n '%s:%s' % (user_id, password)).strip()\n\n def modify_...
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.0693, 0.0416, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.097, 0.0028, 0, 0.66, 0.05, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1053, 0.0028, 0, 0.66, ...
[ "\"\"\"HttpClients in this module use httplib to make HTTP requests.\n\nThis module make HTTP requests based on httplib, but there are environments\nin which an httplib based approach will not work (if running in Google App\nEngine for example). In those cases, higher level classes (like AtomService\nand GDataServi...
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.1506, 0.0897, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2115, 0.0064, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2308, 0.0064, 0, 0.66,...
[ "\"\"\"This module provides a common interface for all HTTP requests.\n\n HttpResponse: Represents the server's response to an HTTP request. Provides\n an interface identical to httplib.HTTPResponse which is the response\n expected from higher level classes which use HttpClient.request.\n\n GenericHttpC...
#!/usr/bin/python # # Copyright (C) 2006, 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ [ 8, 0, 0.0311, 0.0149, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0405, 0.0014, 0, 0.66, 0.04, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0446, 0.0014, 0, 0.66, ...
[ "\"\"\"AtomService provides CRUD ops. in line with the Atom Publishing Protocol.\n\n AtomService: Encapsulates the ability to perform insert, update and delete\n operations with the Atom Publishing Protocol on which GData is\n based. An instance can perform query, insertion, deletion, a...
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 14, 0, 0.1295, 0.0072, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1511, 0.0072, 0, 0.66, 0.1667, 857, 0, 1, 0, 0, 857, 0, 0 ], [ 1, 0, 0.1583, 0.0072, 0, 0...
[ "__author__ = 'api.jscudder (Jeff Scudder)'", "import urlparse", "import urllib", "DEFAULT_PROTOCOL = 'http'", "DEFAULT_PORT = 80", "def parse_url(url_string):\n \"\"\"Creates a Url object which corresponds to the URL string.\n \n This method can accept partial URLs, but it will leave missing\n member...
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.1795, 0.0769, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2393, 0.0085, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.265, 0.0085, 0, 0.66, ...
[ "\"\"\"This module provides a TokenStore class which is designed to manage\nauth tokens required for different services.\n\nEach token is valid for a set of scopes which is the start of a URL. An HTTP\nclient will use a token store to find a valid Authorization header to send\nin requests to the specified URL. If t...
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ [ 14, 0, 0.0369, 0.0017, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0419, 0.0017, 0, 0.66, 0.0435, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0436, 0.0017, 0, 0...
[ "__author__ = 'j.s@google.com (Jeff Scudder)'", "import os", "import StringIO", "import urlparse", "import urllib", "import httplib", "ssl = None", "try:\n import ssl\nexcept ImportError:\n pass", " import ssl", "class Error(Exception):\n pass", "class UnknownSize(Error):\n pass", "class ...
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.086, 0.0136, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0995, 0.0045, 0, 0.66, 0.1667, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1131, 0.0045, 0, 0.66, ...
[ "\"\"\"AtomPubClient provides CRUD ops. in line with the Atom Publishing Protocol.\n\n\"\"\"", "__author__ = 'j.s@google.com (Jeff Scudder)'", "import atom.http_core", "class Error(Exception):\n pass", "class MissingHost(Error):\n pass", "class AtomPubClient(object):\n host = None\n auth_token = None\...
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 14, 0, 0.065, 0.0031, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0743, 0.0031, 0, 0.66, 0.0714, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.0774, 0.0031, 0, 0....
[ "__author__ = 'j.s@google.com (Jeff Scudder)'", "import StringIO", "import pickle", "import os.path", "import tempfile", "import atom.http_core", "class Error(Exception):\n pass", "class NoRecordingFound(Error):\n pass", "class MockHttpClient(object):\n debug = None\n real_client = None\n last_...
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.0823, 0.0206, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0988, 0.0041, 0, 0.66, 0.0833, 812, 0, 1, 0, 0, 812, 0, 0 ], [ 1, 0, 0.1029, 0.0041, 0, 0.66...
[ "\"\"\"MockService provides CRUD ops. for mocking calls to AtomPub services.\n\n MockService: Exposes the publicly used methods of AtomService to provide\n a mock interface which can be used in unit tests.\n\"\"\"", "import atom.service", "import pickle", "__author__ = 'api.jscudder (Jeffrey Scudder)'",...
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 14, 0, 0.0621, 0.003, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.071, 0.003, 0, 0.66, 0.0294, 936, 0, 1, 0, 0, 936, 0, 0 ], [ 14, 0, 0.0799, 0.003, 0, 0.66...
[ "__author__ = 'j.s@google.com (Jeff Scudder)'", "import atom.core", "XML_TEMPLATE = '{http://www.w3.org/XML/1998/namespace}%s'", "ATOM_TEMPLATE = '{http://www.w3.org/2005/Atom}%s'", "APP_TEMPLATE_V1 = '{http://purl.org/atom/app#}%s'", "APP_TEMPLATE_V2 = '{http://www.w3.org/2007/app}%s'", "class Name(ato...
#!/usr/bin/python # # Copyright (C) 2006 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 8, 0, 0.0202, 0.0168, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0303, 0.0007, 0, 0.66, 0.0141, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.0347, 0.0067, 0, 0.66,...
[ "\"\"\"Contains classes representing Atom elements.\n\n Module objective: provide data classes for Atom constructs. These classes hide\n the XML-ness of Atom and provide a set of native Python classes to interact\n with.\n\n Conversions to and from XML should only be necessary when the Atom classes\n \"touch t...
#!/usr/bin/env python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ [ 14, 0, 0.0382, 0.0018, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0436, 0.0018, 0, 0.66, 0.0769, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 7, 0, 0.0536, 0.0182, 0, 0...
[ "__author__ = 'j.s@google.com (Jeff Scudder)'", "import inspect", "try:\n from xml.etree import cElementTree as ElementTree\nexcept ImportError:\n try:\n import cElementTree as ElementTree\n except ImportError:\n try:\n from xml.etree import ElementTree", " from xml.etree import cElementTree as...
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 14, 0, 0.1364, 0.0076, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1591, 0.0076, 0, 0.66, 0.1429, 784, 0, 1, 0, 0, 784, 0, 0 ], [ 1, 0, 0.1667, 0.0076, 0, 0...
[ "__author__ = 'api.jscudder (Jeff Scudder)'", "import atom.http_interface", "import atom.url", "class Error(Exception):\n pass", "class NoRecordingFound(Error):\n pass", "class MockRequest(object):\n \"\"\"Holds parameters of an HTTP request for matching against future requests.\n \"\"\"\n def __init...
#!/usr/bin/python # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ [ 8, 0, 0.1384, 0.0692, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1824, 0.0063, 0, 0.66, 0.05, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.195, 0.0063, 0, 0.66, ...
[ "\"\"\"Create group and update settings using two APIs.\n\nSample to use the Groups Settings API in google-api-python client library\nhttp://code.google.com/p/google-api-python-client/source/checkout\nwith the Groups Provisioning API in gdata-python-client library\nhttp://code.google.com/p/gdata-python-client/sourc...
#!/usr/bin/python # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ [ 8, 0, 0.1577, 0.0615, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2, 0.0077, 0, 0.66, 0.0833, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2154, 0.0077, 0, 0.66, ...
[ "\"\"\"Search users with a given pattern and move to a new organization.\n\nSample to move users to a new organization based on a pattern using\nthe User Provisioning and Organization Provisioning APIs.\n\nUsage:\n $ python search_organize_users.py\n\"\"\"", "__author__ = 'Shraddha Gupta <shraddhag@google.com>'"...
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ [ 8, 0, 0.0656, 0.0039, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0734, 0.0039, 0, 0.66, 0.0345, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0811, 0.0039, 0, 0.66,...
[ "\"\"\"Samples for the Documents List API v3.\"\"\"", "__author__ = 'afshar@google.com (Ali Afshar)'", "import os.path", "import gdata.data", "import gdata.acl.data", "import gdata.docs.client", "import gdata.docs.data", "import gdata.sample_util", "class SampleConfig(object):\n APP_NAME = 'GDataDo...
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ [ 8, 0, 0.3864, 0.0227, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4318, 0.0227, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.75, 0.5227, 0, 0.66, ...
[ "\"\"\"Sample running boilerplate.\"\"\"", "__author__ = 'afshar@google.com (Ali Afshar)'", "def Run(source_file):\n \"\"\"Load a source file and run a sample from it.\"\"\"\n source = open(source_file).read()\n global_dict = {'__file__': source_file}\n exec(source in global_dict)\n samples = [global_dict[...
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 14, 0, 0.25, 0.0139, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2778, 0.0139, 0, 0.66, 0.037, 219, 0, 1, 0, 0, 219, 0, 0 ], [ 1, 0, 0.2917, 0.0139, 0, 0.66...
[ "__author__ = 'e.bidelman (Eric Bidelman)'", "import gdata.contacts", "import gdata.contacts.service", "import gdata.docs", "import gdata.docs.service", "CONSUMER_KEY = 'yourdomain.com'", "CONSUMER_SECRET = 'YOUR_CONSUMER_KEY'", "SIG_METHOD = gdata.auth.OAuthSignatureMethod.HMAC_SHA1", "requestor_id...
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 14, 0, 0.3043, 0.0145, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3333, 0.0145, 0, 0.66, 0.0435, 927, 0, 1, 0, 0, 927, 0, 0 ], [ 1, 0, 0.3478, 0.0145, 0, 0...
[ "__author__ = 'e.bidelman (Eric Bidelman)'", "import gdata.gauth", "import gdata.contacts.client", "import gdata.docs.client", "SOURCE_APP_NAME = 'google-PyClient2LOSample-v2.0'", "CONSUMER_KEY = 'yourdomain.com'", "CONSUMER_SECRET = 'YOUR_CONSUMER_KEY'", "def PrintContacts(client):\n print('\\nListi...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1116, 0.2149, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2314, 0.0083, 0, 0.66, 0.3333, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.2397, 0.0083, 0, 0.66...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
# -*- coding: utf-8 -*- """ Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0523, 0.0939, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1083, 0.0036, 0, 0.66, 0.0909, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.1119, 0.0036, 0, 0.66...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
# -*- coding: utf-8 -*- """ Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0145, 0.026, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.03, 0.001, 0, 0.66, 0.0526, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.031, 0.001, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.2935, 0.5652, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6087, 0.0217, 0, 0.66, 0.5, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 3, 0, 0.8261, 0.3696, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1776, 0.3421, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3553, 0.0132, 0, 0.66, 0.25, 593, 0, 1, 0, 0, 593, 0, 0 ], [ 3, 0, 0.6711, 0.5658, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1134, 0.2185, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2353, 0.0084, 0, 0.66, 0.125, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2437, 0.0084, 0, 0.66,...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ [ 1, 0, 0.34, 0.02, 0, 0.66, 0, 784, 0, 1, 0, 0, 784, 0, 0 ], [ 1, 0, 0.38, 0.02, 0, 0.66, 0.125, 800, 0, 1, 0, 0, 800, 0, 0 ], [ 1, 0, 0.4, 0.02, 0, 0.66, 0.25...
[ "import getpass", "from gdata.contentforshopping.data import build_entry", "from gdata.contentforshopping.client import ContentForShoppingClient", "account_id = raw_input('Merchant Account ID? ').strip()", "email = raw_input('Google Email Address? ').strip()", "client = ContentForShoppingClient(account_id...
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ [ 1, 0, 0.3036, 0.0179, 0, 0.66, 0, 784, 0, 1, 0, 0, 784, 0, 0 ], [ 1, 0, 0.3393, 0.0179, 0, 0.66, 0.1111, 800, 0, 1, 0, 0, 800, 0, 0 ], [ 1, 0, 0.3571, 0.0179, 0, ...
[ "import getpass", "from gdata.contentforshopping.data import build_entry", "from gdata.contentforshopping.client import ContentForShoppingClient", "account_id = raw_input('Merchant Account ID? ').strip()", "email = raw_input('Google Email Address? ').strip()", "client = ContentForShoppingClient(account_id...