felipedau / stretch

PBKDF2 on the command line
MIT License
0 stars 0 forks source link

After a python3 package upgrade. #1

Open skaht opened 6 years ago

skaht commented 6 years ago

Updated to new Python 3.7.0 package from 3.6.0 that seemed to work fine on OSX 10.13.5.

% brew info python3

Interpreted, interactive, object-oriented programming language
https://www.python.org/
/Users/Scott/usr2/local/homebrew/Cellar/python/2.7.11 (6,243 files, 85.5MB)
  Built from source on 2015-12-21 at 18:34:31
/Users/Scott/usr2/local/homebrew/Cellar/python/2.7.13 (6,336 files, 88.7MB)
  Built from source on 2017-02-06 at 23:18:17
/Users/Scott/usr2/local/homebrew/Cellar/python/3.5.1 (7,651 files, 106.5MB)
  Built from source on 2015-12-21 at 23:21:24
/Users/Scott/usr2/local/homebrew/Cellar/python/3.6.0 (7,951 files, 109.8MB)
  Built from source on 2017-02-05 at 22:45:13
/Users/Scott/usr2/local/homebrew/Cellar/python/3.6.0_1 (7,952 files, 109.8MB)
  Built from source on 2017-03-19 at 00:13:21
/Users/Scott/usr2/local/homebrew/Cellar/python/3.7.0 (9,336 files, 160.4MB) *
  Built from source on 2018-07-08 at 13:23:18
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb

After the hack supplied below and explicitly

% stretch foo bar

  File "/Users/Scott/usr2/local/bin/stretch", line 7, in <module>
    from stretch.stretch import main
  File "/Users/Scott/usr2/local/lib/python3.7/site-packages/stretch/stretch.py", line 67
    print result 

% vi +67 /Users/Scott/usr2/local/lib/python3.7/site-packages/stretch/stretch.py print(result)

% pip3 install passlib

% pip3 list

---------- -------
passlib    1.7.1  
pip        10.0.1 
setuptools 39.2.0 
stretch    1.4    
virtualenv 16.0.0 
wheel      0.31.1 

Notice the extra decorations around the base64 content.

% stretch foo bar

b'FUMV4GHTdgpdEbseRSkUNiTd6CYktCUr3XPqy+pp7cPk7R7Ho0L1JJDXMbcYQkA/gkWQ7BoSOtRcMnvnD8qqhg=='
skaht commented 6 years ago

Was hoping for some feedback by now. Not sure what the extra stretch prefix/post decorations mean after upgrading to Python version 3.7.0 from 3.6.0_1. The answers to the two examples below should be the same.

% stretch -f sha512 -r 2048 "bunker wreck real edge inflict aerobic buddy mercy divorce wolf bright immune fat foot poet section sustain reveal unique reflect have latin problem chapter" mnemonic123 b'sHlDsrlJft4ZhwzzrVhVC+sViO7+EIcyzNW8SSlpo7XL4MfupzuQo/Ew5GXHveyxhRdE45TyBVk7Nlzm7hL0WA=='

% echo "bunker wreck real edge inflict aerobic buddy mercy divorce wolf bright immune fat foot poet section sustain reveal unique reflect have latin problem chapter" | bx mnemonic-to-seed -p 123 | bx base16-decode | bx base64-encode

sHlDsrlJft4ZhwzzrVhVC+sViO7+EIcyzNW8SSlpo7XL4MfupzuQo/Ew5GXHveyxhRdE45TyBVk7Nlzm7hL0WA==