473,407 Members | 2,306 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,407 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 2551

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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.