Overview

Namespaces

  • Liberty
  • None

Classes

  • BigInteger
  • Block
  • Blockchain
  • Collection
  • CollectionFileList
  • File
  • Folder
  • INI
  • LECDSA
  • Onecrypt
  • SSV
  • Text
  • Transaction
  • Wallet
  • WebPeer
  • Overview
  • Namespace
  • Class

Class Onecrypt

Onecrypt. An Autonomous Liberty Eliptic Curve and Digital Signature Algorithm. (In Development)

Copyright (C) Liberty Group cryptolibertygroup@gmail.com.

Unlicense. Public Domain. http://unlicense.org/ This piece of software is provided without warranty of any kind, use it at your own risk.

Namespace: Liberty
Package: Liberty
Category: Cryptocurrency
License: Unlicense
Author: Liberty Group cryptolibertygroup@gmail.com, Jan Moritz Lindemann
Version: 1.0.0
Since: 2017-03-25
Located at Liberty/Onecrypt.php
Methods summary
public
# __construct( )
public
# numToVarIntString( $i )
public
# setNetworkPrefix( $prefix )
public string
# getNetworkPrefix( )

Returns the current network prefix, '00' = main network, '6f' = test network.

Returns the current network prefix, '00' = main network, '6f' = test network.

Returns

string
(hexa)
public string
# getPrivatePrefix( )

Returns the current network prefix for WIF, '80' = main network, 'ef' = test network.

Returns the current network prefix for WIF, '80' = main network, 'ef' = test network.

Returns

string
(hexa)
public
# base58_permutation( $char, $reverse = false )
public
# hash256( $data )
public string
# hash160( string $data )

Parameters

$data

Returns

string
(hexa)
public string
# generateRandom256BitsHexaString( )

Generates a random 256 bytes hexadecimal encoded string that is smaller than n

Generates a random 256 bytes hexadecimal encoded string that is smaller than n

Returns

string
(hexa)

Throws

Exception
public
# base58_encode( $data, $littleEndian = true )
public
# base58_decode( $encodedData, $littleEndian = true )
public
# doublePoint( array $pt )
public
# addPoints( array $pt1, array $pt2 )
public
# mulPoint( $k, array $pG, $base = null )
public
# sqrt( $a )
public
# calculateYWithX( $x, $derEvenOrOddCode = null )
public
# getPubKeyPointsWithDerPubKey( $derPubKey )
public string
# getDerPubKeyWithPubKeyPoints( array $pubKey, boolean $compressed = true )

Parameters

$pubKey
(array <x:string, y:string>)
$compressed

Returns

string
public
# validatePoint( $x, $y )
public
# getPubKeyPoints( )
public
# getUncompressedPubKey( array $pubKeyPts = [] )
public
# getPubKey( array $pubKeyPts = [] )
public
# getUncompressedAddress( $compressed = false, $derPubKey = null )
public
# getAddress( $derPubKey = null )
public
# setPrivateKey( $k )
public
# getPrivateKey( )
public
# generateRandomPrivateKey( )
public
# validateAddress( $address )
public
# getWif( $compressed = true )
public
# getUncompressedWif( )
public
# validateWifKey( $wif )
public boolean
# setPrivateKeyWithWif( string $wif )

Parameters

$wif
(base58)

Returns

boolean
public
# getSignatureHashPoints( $hash, $nonce = null )
public
# signHash( $hash, $nonce = null )
public
# signMessage( $message, $onlySignature = false, $compressed = false, $nonce = null )
public
# getPubKeyWithRS( $flag, $R, $S, $hash )
public
# checkSignaturePoints( $pubKey, $R, $S, $hash )
public
# checkDerSignature( $pubKey, $signature, $hash )
public
# checkSignatureForRawMessage( $rawMessage )
public
# checkSignatureForMessage( $address, $encodedSignature, $message )
Properties summary
public $k
#
public $a
#
public $b
#
public $p
#
public $n
#
public $G
#
public $networkPrefix
#
API documentation generated by ApiGen