This file contains 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
package main | |
import ( | |
"crypto/rand" | |
"crypto/sha256" | |
"fmt" | |
"github.com/cloudflare/circl/ecc/bls12381" | |
) | |
type KDF struct { |
This file contains 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
PS C:\Users\Hamdaan\Desktop\downloads\webcrypto.dart> flutter test --coverage | |
00:17 +1425: All tests passed! |
This file contains 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:webcrypto/webcrypto.dart'; | |
import 'dart:convert'; | |
Future<void> main() async { | |
// Generate a new key using SHA-256 and an optional length parameter. | |
final key = await HmacSecretKey.generateKey(Hash.sha256, length: 256); | |
// Sign the message. | |
final signature = await key.signBytes(utf8.encode('Hello World!')); | |
This file contains 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
PS E:\kanidm> cargo test | |
warning: unused variable: `path` | |
--> libs\file_permissions\src\windows.rs:21:22 | |
| | |
21 | pub fn diagnose_path(path: &Path) -> Diagnosis { | |
| ^^^^ help: if this is intentional, prefix it with an underscore: `_path` | |
| | |
= note: `#[warn(unused_variables)]` on by default | |
warning: `kanidm_lib_file_permissions` (lib) generated 1 warning (run `cargo fix --lib -p kanidm_lib_file_permissions` to apply 1 suggestion) |
This file contains 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
root@LAPTOP-B88S065R:/mnt/c/Users/Hamdaan/Desktop/kanidm# cargo test | |
Updating git repository `https://github.com/kanidm/webauthn-rs.git` | |
Updating crates.io index | |
Updating git repository `https://github.com/dnaeon/rust-sshkeys.git` | |
Downloaded pin-project v1.1.4 | |
Downloaded password-hash v0.5.0 | |
Downloaded prokio v0.1.0 | |
Downloaded overload v0.1.1 | |
Downloaded asn1-rs-derive v0.1.0 | |
Downloaded async-stream-impl v0.3.5 |
This file contains 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 { generateKeyPair, generateSharedSecret, generateHMAC, KeyPair } from '../utils/crypto.utils'; | |
import axios from 'axios'; | |
let sharedSecret: Buffer; | |
export async function sendAAPublicKey(): Promise<Buffer> { | |
try { | |
const response = await axios.get('http://localhost:3000/init'); | |
const boostPublicKey: Buffer = Buffer.from(response.data.boostPublicKey, 'hex'); |
This file contains 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
const express = require("express"); | |
const axios = require("axios"); | |
const fs = require("fs").promises; | |
const path = require("path"); | |
const app = express(); | |
const port = 3000; | |
// Function to fetch private resource | |
const fetchPrivateResource = async () => { |
This file contains 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
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const cors = require('cors'); | |
const { filter } = require('lodash'); | |
const app = express(); | |
app.use(bodyParser.json()); | |
app.use(cors()); |
This file contains 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
REMIX DEFAULT WORKSPACE | |
Remix default workspace is present when: | |
i. Remix loads for the very first time | |
ii. A new workspace is created | |
iii. There are no files existing in the File Explorer | |
This workspace contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. |