Final key gen algo; move to []byte instrad of str