Commit Graph
43 Commits
Author SHA1 Message Date
Jaco Greeff 995dfecf61 Initial pair encryption (xsalsa20-poly1305) (#107)
* Allow keypair generation from input string

* Add keyfile encryption/decryption

* Pass secret through n rounds

* Split definition types

* Additional cleanups

* Pass salt as blake2b input

* Move kdf hashing to util-cypto

* Dangling comma

* Pull through secret as string | Uint8Array

* Update documentation
2018-03-13 17:04:44 +01:00
Jaco Greeff 4b65a59c2b Fix LE hex conversion for BN (#104) 2018-03-08 12:47:54 +01:00
Jaco Greeff 19b4cc2865 Upgrade @polkadot/dev (#101) 2018-02-26 16:00:16 +01:00
Jaco Greeff be7d5842de Add u8a <-> BN endian (#95) 2018-02-21 10:59:58 +01:00
Jaco Greeff ce36deb6f9 Fix blake2 with proper key & length (#94)
* Fix blake2 with proper key & length

* Fix linting

* Update @polkadot/dev for blakejs typings
2018-02-20 17:13:26 +01:00
Jaco Greeff 532c526bc7 Add basic u8aToString (#92) 2018-02-20 14:01:02 +01:00
Jaco Greeff 480a2f05c4 Fix xxhash outputs as LE (#91) 2018-02-20 10:01:32 +01:00
Jaco Greeff ece0c95691 Remove types (#90) 2018-02-16 14:53:53 +01:00
Jaco Greeff f79d7fe68e bnToU8a supports endian (#87)
* bnToU8a supports endian

* Update with new bn.js flow
2018-02-13 14:30:10 +01:00
Jaco Greeff e9cace8c1e Bump (patch, CI) 2018-02-13 10:12:49 +01:00
Jaco Greeff 03dc89c2b6 Remove exposed Buffer in crypto (#80)
* Use js-sha3 instead of keccak

* Remove exposed toBuffer from util-crypto

* Add definiton for js-sha3

* Remove Buffer from docs

* Cleanup crypto hashing

* Cleanup interface
2018-02-08 16:12:00 +01:00
Jaco Greeff e832aebb07 Introduce @polkadot/util-rlp (#76)
* Add toU8a conversions

* Add u8a utilities

* @polkadot/rlp with encoding

* Decoding test runthrough

* Update util locations

* Convert util-triehash to use util-rlp

* Allow keccak from Uint8Array

* Pass Uint8Array to keccak input

* Update documentation

* Skip some doc generation

* Update @polkadot/dev

* Update doc typo

* Update allocations

* Retrieve tests from ethereumjs-testing

* Simplify test retrieval

* Exclude etereumjs-testing from flow
2018-02-08 14:50:54 +01:00
Jaco Greeff 6b3be0bc30 Introduce @polkadot/util-triehash (#75)
* Expand util-crypto test coverage

* Add @polkadot/util-triehash

* Update link to util-triehash
2018-02-07 13:41:45 +01:00
Jaco Greeff 523dc1c48d Update hashing functions to ref (#68)
* Package upgrades

* Use h64 by default

* Remove AsNumber distinction

* xxhash32/64 & blake2b/2s

* Add xxhashAsHex{128,256}

* Add blake2AsHex{128,256,512}

* Update documentation

* Update docs
2018-01-30 11:55:32 +01:00
Jaco Greeff 8fbfe612f9 Use deasync loopWhile (#67) 2018-01-29 10:18:04 +01:00
Jaco Greeff b5c5734c7c Add Blake2s & XXHash utility functions (#66)
* Initial split of util & util-crypto

* Add initial XXHash version

* Blake2s wit tests & documentation

* Add sha512 (from NaCl)

* Add randomBytes (from NaCl)

* Flow fixes

* Update documentation

* Update latest @polkadot/dev
2018-01-25 14:13:43 +01:00
Jaco Greeff f20035fe97 Move util function from @polkadot/client (#62) 2018-01-11 17:48:38 +01:00
Jaco Greeff 6e68784481 2018 (#57) 2018-01-04 08:48:28 +01:00
Jaco Greeff fe53d2ab2d Prefer static to runtime types (#56) 2017-12-30 17:43:51 +01:00
Jaco Greeff e77d536edd Add isBoolean (#53) 2017-12-17 20:16:15 +01:00
Jaco Greeff 9fd345993e Logger param type update (#48) 2017-12-14 09:29:42 +01:00
Travis CI b659622384 [CI Skip] 0.7.1 2017-12-11 19:40:48 +00:00
Jaco Greeff 77fccc3760 arrayFilter, isIp, isObject & isHex (optional bitLength) (#46) 2017-12-11 20:37:50 +01:00
Travis CI c41ac8a421 [CI Skip] 0.6.10 2017-12-07 21:21:15 +00:00
Travis CI 0dafb78bb4 [CI Skip] 0.6.8 2017-12-06 21:07:27 +00:00
Jaco Greeff e6cd09a02a hexFixLength (#42)
* hexFixLength

* Update @polkadot/api-jsonrpc
2017-12-06 22:05:10 +01:00
Jaco Greeff 6bf6425f76 Expand assert to use message: string | () => string (#39)
* Expand assert to use message: string | () => string

* Update docs
2017-12-03 10:54:42 +01:00
Jaco Greeff d8be0941e3 Bump dev, fix jest root (#38) 2017-12-02 10:51:38 +01:00
Jaco Greeff d1eafd084c Truthy test (#37)
* Truthy test

* Update dev
2017-12-02 10:31:51 +01:00
Jaco Greeff 5d0a7231dc Fix alias links (#34)
* Fix alias links

* Update alias links

* Update generated docs
2017-12-01 20:34:51 +01:00
Jaco Greeff 1cbbfccc2f Update eslint from dev (#33) 2017-11-30 21:38:41 +01:00
Jaco Greeff d02c05ba49 Alias to <-> from (#31)
* bn <-> hex aliasses

* Bump minor

* Split tests into singular files

* to <-> from alias

* Add Codeclimate badge
2017-11-30 20:16:17 +01:00
Travis CI 02c6336c65 [CI Skip] 0.5.20 2017-11-29 20:24:46 +00:00
Travis CI 98ca7d3a72 [CI Skip] 0.5.19 2017-11-29 17:51:56 +00:00
Travis CI 32c0ea791c [CI Skip] 0.5.18 2017-11-28 23:08:22 +00:00
Travis CI 2522eccb6c [CI Skip] 0.5.17 2017-11-28 22:53:28 +00:00
Jaco Greeff 279db7fae4 Updates for new monorepo packages (#25)
* Update badges

* Add badges

* Cleanup scripts

* Shorthand

* Align build spec

* User @polkadot/api-jsonrpc dev dep

* Update deps
2017-11-28 18:22:56 +01:00
Travis CI 79d6210803 [CI Skip] 0.5.15 2017-11-27 19:15:37 +00:00
Travis CI 577a910ded [CI Skip] Build artifacts 2017-11-26 16:47:50 +00:00
Jaco Greeff d2fa4735fd Pull flow-typed from @polkadot/dev (#20)
* Pull flow-typed from @polkadot/dev

* Update @polkadot/dev
2017-11-26 13:30:39 +01:00
Travis CI cf9440c5b6 [CI Skip] Build artifacts 2017-11-25 00:34:10 +00:00
Jaco Greeff 01173aea60 Add logger for consistent info output (#14)
* Add logger as a util

* Add logger

* Update flow checks
2017-11-23 19:37:02 +01:00
Jaco Greeff f9b94bb7ec Use yarn (#13) 2017-11-23 00:21:32 +01:00