This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if an (origin) URL is local based on the RFC 1918 list of reserved | |
* addresses. It accepts http(s) and ws(s) schemas as well as port numbers. | |
* | |
* localhost | |
* 127.0.0.0 – 127.255.255.255 | |
* 10.0.0.0 – 10.255.255.255 | |
* 172.16.0.0 – 172.31.255.255 | |
* 192.168.0.0 – 192.168.255.255 | |
* + extra zero config range on IEEE 802 networks: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1JrhP8a5KrSmS7uCreg4JVaR7R7Qn7nFqG https://explorer.blockstack.org/address/1JrhP8a5KrSmS7uCreg4JVaR7R7Qn7nFqG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
did:muport:QmPoZWgtvv8NQAkmfz6vBCrGQqb2nuBJgcrVLDb4Gqyz2e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:steel_crypt/steel_crypt.dart'; | |
import 'dart:convert'; | |
void main() async { | |
final passHash = PassCrypt('SHA-256/HMAC/PBKDF2'); | |
final ivsalt = CryptKey().genDart(16); | |
final derivationPassword = 'foobar'; | |
final derivedHash = passHash.hashPass(ivsalt, derivationPassword); | |
// prepare the key to be used by AesCrypt | |
final derivedBytes = base64Decode(derivedHash); |
OlderNewer