void main() {
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
pub fn add(left: usize, right: usize) -> usize { | |
left + right | |
} | |
#[cfg(test)] | |
mod tests { | |
use super::*; | |
#[test] | |
fn it_works() { |
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
fn main() { | |
use num_bigint::BigInt; | |
// This section performs RSA encryption and decryption using BigInt for large integers. | |
let p = BigInt::from(1489); // First prime number | |
let q = BigInt::from(1493); // Second prime number | |
let n = &p * &q; // Calculate n as the product of p and q | |
let phi = (&p - 1) * (&q - 1); // Calculate phi(n) = (p-1)(q-1) | |
println!("n {} phi {}", n, phi); // Output n and phi | |
let e = BigInt::from(13); // Public exponent |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<script> | |
// hacer la image | |
function demoImagen(canvas) { | |
const ctx = canvas.getContext("2d"); |
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
kind delete cluster --name=kind | |
cat << EOF > kind-config.yaml | |
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
networking: | |
apiServerAddress: "0.0.0.0" | |
apiServerPort: 6443 | |
nodes: | |
- role: control-plane |
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
➜ fabric-hlf cat > "connection.json" <<CONN_EOF | |
{ | |
"address": "asset.docker:9999", | |
"dial_timeout": "10s", | |
"tls_required": false | |
} | |
CONN_EOF | |
➜ fabric-hlf rm code.tar.gz chaincode.tgz | |
export CHAINCODE_NAME=asset2 | |
export CHAINCODE_LABEL=asset2 |
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 "./App.css"; | |
import Container from "react-bootstrap/Container"; | |
import { Card, CardTitle, CardBody } from "react-bootstrap"; | |
const menusDatabase = { | |
name: "mvp", | |
days: [ | |
{ | |
day: "lunes", | |
desa: "desa1", |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.IO; | |
using System.Xml.Linq; | |
using System.Xml; | |
using System.Xml.XPath; | |
namespace GeneracionPaginas | |
{ |
Creacion de una ca un server certificates and client certificates
Con esto creamos una ca y uno o varios client certificates. Podemos crear tambien un server certificate
CODIGO NODE EXPRESS PARA DETECTAR EL CLIENT CERTIFICATE
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
COMIENZO | |
fin de creacion de agentes | |
{ | |
'content-type': 'application/didcomm-envelope-enc', | |
accept: '*/*', | |
'content-length': '2726', | |
'user-agent': 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)', | |
'accept-encoding': 'gzip,deflate', | |
connection: 'close', | |
host: 'localhost:5555' |
NewerOlder