Skip to content

ddulesov/pystribog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pystribog

Streebog hash (GOST R 34.11-2012 ) python library

Build Status Build Status

Features

  • python 3.x and python 2.7 support
  • use fast C(sse4.1/sse2) streebog hash function implementation based on degtyarev library
  • Linux , Windows (probably OSx but not tested) supported

Requirements

  • python 2.7 or python 3.8+
  • gcc 7.x+ or msvc compatible with used Python version
  • sse4.1 capable CPU

Building and Installation

#run in development host
#sudo apt-get install -y build-essential python3 python3-dev
git clone --depth 1  https://github.com/ddulesov/pystribog.git

cd pystribog
python3 setup.py build install

#run tests

python3 module_tests.py

#optionaly create dist
python3 setup.py bdist

Quickstart

import _pystribog
import binascii
h = _pystribog.StribogHash( _pystribog.Hash512 )
h.update(b"12345")
res = h.digest()
print( "hex512(b'12345')=", binascii.hexlify(res) )