Update README.md
This commit is contained in:
parent
d7f1d215dd
commit
e2948b1db5
10
README.md
10
README.md
@ -33,21 +33,18 @@ This template contains standard operations that can be used for the following:
|
|||||||
`generateNewID` generates a new flo ID and returns private-key, public-key and floID
|
`generateNewID` generates a new flo ID and returns private-key, public-key and floID
|
||||||
|
|
||||||
#### Calculate Public Key Hex
|
#### Calculate Public Key Hex
|
||||||
floCrypto.getPubKeyHex(privateKey)
|
|
||||||
`getPubKeyHex` returns public-key from given private-key
|
`getPubKeyHex` returns public-key from given private-key
|
||||||
Arguments :
|
floCrypto.getPubKeyHex(privateKey)
|
||||||
1. privateKey - private key in WIF format (Hex)
|
1. privateKey - private key in WIF format (Hex)
|
||||||
|
|
||||||
#### Calculate FLO ID
|
#### Calculate FLO ID
|
||||||
floCrypto.getFloIDfromPubkeyHex(publicKey)
|
floCrypto.getFloIDfromPubkeyHex(publicKey)
|
||||||
`getFloIDfromPubkeyHex` returns flo-ID from public-key
|
`getFloIDfromPubkeyHex` returns flo-ID from public-key
|
||||||
Arguments :
|
|
||||||
1. publicKey - public key hex value
|
1. publicKey - public key hex value
|
||||||
|
|
||||||
#### Verify Private Key
|
#### Verify Private Key
|
||||||
floCrypto.verifyPrivKey(privateKey, pubKey_floID, *isfloID)
|
floCrypto.verifyPrivKey(privateKey, pubKey_floID, *isfloID)
|
||||||
`verifyPrivKey` verify the private-key for the given public-key or flo-ID
|
`verifyPrivKey` verify the private-key for the given public-key or flo-ID
|
||||||
Arguments :
|
|
||||||
1. privateKey - private key in WIF format (Hex)
|
1. privateKey - private key in WIF format (Hex)
|
||||||
2. pubKey_floID - public Key or flo ID
|
2. pubKey_floID - public Key or flo ID
|
||||||
3. isfloID - boolean value (true - compare as flo ID, false - compare as public key) (optional, default is true)
|
3. isfloID - boolean value (true - compare as flo ID, false - compare as public key) (optional, default is true)
|
||||||
@ -55,34 +52,29 @@ Arguments :
|
|||||||
#### Validate FLO ID
|
#### Validate FLO ID
|
||||||
floCrypto.validateAddr(floID)
|
floCrypto.validateAddr(floID)
|
||||||
`validateAddr` check if the given Address is valid or not
|
`validateAddr` check if the given Address is valid or not
|
||||||
Arguments :
|
|
||||||
1. floID - flo ID to validate
|
1. floID - flo ID to validate
|
||||||
|
|
||||||
#### Data Encryption
|
#### Data Encryption
|
||||||
floCrypto.encryptData(data, publicKey)
|
floCrypto.encryptData(data, publicKey)
|
||||||
`encryptData` encrypts the given data using public-key
|
`encryptData` encrypts the given data using public-key
|
||||||
Arguments :
|
|
||||||
1. data - data to encrypt
|
1. data - data to encrypt
|
||||||
2. publicKey - public key of the recipient
|
2. publicKey - public key of the recipient
|
||||||
|
|
||||||
#### Data Decryption
|
#### Data Decryption
|
||||||
floCrypto.decryptData(data, privateKey)
|
floCrypto.decryptData(data, privateKey)
|
||||||
`decryptData` decrypts the given data using private-key
|
`decryptData` decrypts the given data using private-key
|
||||||
Arguments :
|
|
||||||
1. data - encrypted data to decrypt (Object that was returned from encryptData)
|
1. data - encrypted data to decrypt (Object that was returned from encryptData)
|
||||||
2. privateKey - private key of the recipient
|
2. privateKey - private key of the recipient
|
||||||
|
|
||||||
#### Sign Data
|
#### Sign Data
|
||||||
floCrypto.signData(data, privateKey)
|
floCrypto.signData(data, privateKey)
|
||||||
`signData` signs the data using the private key
|
`signData` signs the data using the private key
|
||||||
Arguments :
|
|
||||||
1. data - data to sign
|
1. data - data to sign
|
||||||
2. privateKey - private key of the signer
|
2. privateKey - private key of the signer
|
||||||
|
|
||||||
#### Verify Signature
|
#### Verify Signature
|
||||||
floCrypto.decryptData(data, signature, publicKey)
|
floCrypto.decryptData(data, signature, publicKey)
|
||||||
`decryptData` verifies signatue of the data using public-key
|
`decryptData` verifies signatue of the data using public-key
|
||||||
Arguments :
|
|
||||||
1. data - data of the given signature
|
1. data - data of the given signature
|
||||||
2. signature - signature of the data
|
2. signature - signature of the data
|
||||||
3. publicKey - public key of the signer
|
3. publicKey - public key of the signer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user