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
| <?php declare(strict_types=1); | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |
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
| <?php | |
| class DerHelpers | |
| { | |
| public const COSE_ALG_EDDSA = -8; | |
| public const COSE_ALG_ES256 = -7; | |
| public const COSE_ALG_RS256 = -257; | |
| public const COSE_KTY_OKP = 1; |
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
| const { Combination } = require("js-combinatorics"); | |
| const and = (a,b) => a & b; | |
| const nor = (a,b) => !(a | b); | |
| const or = (a,b) => (a | b); | |
| const nand = (a,b) => !(a & b); | |
| const b2i = (a) => a ? 1 : 0; | |
| const ops = [ | |
| {'name': 'and', 'fn': and}, |