Skip to content

python built-in module implements common algorithms such as crc, md5, rc, des, aes, base64.

License

Notifications You must be signed in to change notification settings

brinkqiang/pycrypto

Repository files navigation

pycrypto

Copyright (c) 2013-2018 brinkqiang ([email protected])

Build status

Linux Mac Windows
lin-badge mac-badge win-badge

Intro

  • pycrypto
# -*- coding: utf-8 -*-
import pycrypto

rc = pycrypto.CDMRC()
rc.SetKey("123456")
enbuf = rc.Encrypt("hello world")
print(enbuf)
debuf = rc.Decrypt(enbuf)
print(debuf)

md5 = pycrypto.CDMMD5()
print(md5.GetMD5("hello world"))

base64 = pycrypto.CDMBase64()
base64_encode = base64.Base64Encode("hello world")
print(base64_encode)
base64_decode = base64.Base64Decode(base64_encode)
print(base64_decode)

output

皹=钄�改
hello world
5EB63BBBE01EEED093CB22BB8F5ACDC3
aGVsbG8gd29ybGQ=
hello world

Thanks

About

python built-in module implements common algorithms such as crc, md5, rc, des, aes, base64.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published