Thursday, September 6, 2018

How do you correct, 'TypeError: Unicode-objects must be encoded before hashing'?

When you import 'hashlib' in Python and try to run the following statement you would get an error as shown:
----------
>>> print (hashlib.sha256("Hello World").hexdigest())
Traceback (most recent call last):
  File "", line 1, in
    print (hashlib.sha256("Hello World").hexdigest())
TypeError: Unicode-objects must be encoded before hashing
-----------

There are two ways you can correct this error:
---------
>>> print (hashlib.sha256(b"Hello World").hexdigest())
a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
------------
>>> print (hashlib.sha256("Hello World".encode('utf-8')).hexdigest())
a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
---------------------------
Python version used:
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.

Wednesday, September 5, 2018

How do you install bitcoinlib for Python?

Python is well placed to work with Bitcoin. GitHub site has the required libraries.  Bitcoinlib is available at GitHub.

You need to get this file (bitcoin-master.lib)from GitHub site

https://github.com/cryptean/bitcoinlib

You can install using pip as shown below.

pipinsallbitcoin

The following library items are added:


BitcoinLibPython_1


Is there a Microsoft bitcoin storage application?

There is one in fact, it is called the Microsoft bitcoinwallet. You can find all about it here:

https://microsoft.bitcoinwallet.com/



bitcoinwallet_9

If you register to get a bitcoinwallet for yourself then your web interface for transactions will be:

https://.bitcoinwaller.com

If someone sends you some bitcoins then there is a digital address (shown in red that will be specific to each wallet owner) that they need to use while sending the bitcoins.

The important thing to note is that you need to have a bitcoinwallet before you buy bitcoins. You need to have bitcoins in your wallet before you can sell bitcoins.


What is Kraken?

If you have been watching Bitcoin development you surely would have heard of Kraken. This San Francisco based company started operating internationally in 2011

Kraken_2

Kraken is a Bitcoin exchange where Fiat Currency as well as Digital currency can be exchanged. That is to say, you can send them US$, Japanese Yen etc. and get digital currency such as Bitcoin.

You can store your Bitcoin/Fiat currency on the Kraken site, but you should pull it into your own Bitcoin Wallet as your own wallet may provide a greater level of security than a web site can offer.

This is a Kraken summary info found on CoinCentral.com site.


Key features of Kraken from Kraken site.


Tuesday, September 4, 2018

What does SAARC stand for?

SAARC is an abbreviation for South Asian Association for Regional Cooperation founded in December 1985.

There are 8 countries that belong to this association. They are:

Afghanistan
Bangladesh
Bhutan
India
Maldives
Nepal
Pakistan
Sri Lanka

21% of World Population live here on a 3% area of the World (Wikipedia)

Monday, September 3, 2018

What is a Microsoft Wallet?

It is an app (program)  that empowers you to have credit card convenience, without the card. It is supported on many contactless payment terminals. This tapping to a terminal charges the purchase to your default credit or debit card. You can get it from Microsoft Store.



You can store as many credit cards and debit cards as you want in Microsoft Wallet. It is very easy to purchase with your card of choice. You can change what card you want to charge, but just tapping.
Besides credit cards you can store other types of cards such as library cards, memberships cards etc.
When you pay for purchases the wallet does not shared your credit card number with the retailer. That's a good one.
Tapping starts a single-use transaction number and an encrypted security code that will not work on any other purchase, person or device. You use your device pin to make a purchase to unlock your phone.

Loosing a phone is not like loosing your card numbers. The credit card numebrs are not stored in the phone but make sure you remember your pin. You can show yoru phone on a map and you can lock it or erase it remotely.
It is accepted  by many banks and card types.

Here is my Microsoft Wallet on Microsoft Lumia 950:




Wednesday, August 29, 2018

How much does a 'satoshi' cost?

It depends on the day and time you want to know the conversion rate. Satoshi is the unit of Bitcoin.


Satoshi_1 from site below

You can get the conversion rate here:
https://99bitcoins.com/satoshi-usd-converter/

I just tried to find today (8/29/2018 around 5.00 PM Hawaiian time).


Satoshi