Giter Site home page Giter Site logo

SM2解密相关 about gmalg HOT 1 CLOSED

entarohydralisk avatar entarohydralisk commented on September 3, 2024
SM2解密相关

from gmalg.

Comments (1)

ww-rm avatar ww-rm commented on September 3, 2024

正确的调用应当是:

sk = bytes.fromhex('4A1ED9ED547F5B957033A17D126AC8A3A53A81AA28458BF0F9C4D5E59823D970')
cipher_text = bytes.fromhex('044B3E911512FD8229C728F5F7DCEA2FFEA328A3E00F633584EBD5C07C7AD62751CC8FE24A275C7C2EB4585B14A673B72CEA871B28D4524D0268A0CDEA554973D25D034079BBB81B483AC4D029C40762F3C5FF187A071CE1F9820AB7DF89A83357273FAF5B3D7A5FFF98169288BCF855B9')
sm2_decrypt_outside = gmalg.SM2(sk=sk, uid=b"1234567812345678")
plain = sm2_decrypt_outside.decrypt(cipher_text)
print('SM2解密出的数据:', plain.hex())

from gmalg.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.