473,396 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Re: SHA1withRSA in python

Ok thanks,

for the records here is the python code to be compatible with java
sha1withrsa:

import M2Crypto

md=M2Crypto.EVP.MessageDigest('sha1')
md.update(clearpass)
p=md.digest()
key=M2Crypto.RSA.load_key(pathtokey)
enc=key.sign(p)

regards
Nicola

Il giorno mer, 12/11/2008 alle 17.45 +1100, Python Nutter ha scritto:
For simple hashing algorithms, then use the aformentioned built in
hashlib in Python.

However for the rest you need M2Crypto to get a wrapper around OpenSSL:

M2Crypto is the most complete Python wrapper for OpenSSL featuring
RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including
AES); SSL functionality to implement clients and servers; HTTPS
extensions to Python's httplib, urllib, and xmlrpclib; unforgeable
HMAC'ing AuthCookies for web session management; FTP/TLS client and
server; S/MIME; ZServerSSL: A HTTPS server for Zope and ZSmime: An
S/MIME messenger for Zope. M2Crypto can also be used to provide SSL
for Twisted.

http://chandlerproject.org/Projects/MeTooCrypto
Cheers,
PN

2008/11/12 Mailing List SVR <li***@svrinformatica.it>:
Hi all,

in java there are several libraries for sha1withrsa, there is something
similar in python?

thanks
Nicola

--
http://mail.python.org/mailman/listinfo/python-list
Nov 18 '08 #1
0 2549

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Emile van Sebille | last post by:
QOTW: "If we get 2.3.3c1 out in early December, we could release 2.3.3 final before the end of the year, and start 2004 with a 100% bug-free codebase <wink>." -- Tim Peters "cjOr proWe vbCould...
0
by: Emile van Sebille | last post by:
QOTW: "Have you ever used the copy module? I am *not* a beginner, and have used it *once* (and I can't remember what for, either)." -- Michael Hudson "It will likely take a little practice...
0
by: Mailing List SVR | last post by:
Hi all, in java there are several libraries for sha1withrsa, there is something similar in python? thanks Nicola
0
by: Python Nutter | last post by:
For simple hashing algorithms, then use the aformentioned built in hashlib in Python. However for the rest you need M2Crypto to get a wrapper around OpenSSL: M2Crypto is the most complete...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.