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
We need to be prepared with the tools needed for secure communications. | |
Downloading these libraries acts as safeguard for privacy, as we will always be able to build and disribute encrypted applications. | |
And if you're really paranoid, you'll back up a favorite Linux distro, browser and compiler. | |
* Crypto++ - https://github.com/weidai11/cryptopp | |
* Botan - https://github.com/randombit/botan | |
* BouncyCastle Java - https://github.com/bcgit/bc-java | |
* BouncyCastle C# - https://github.com/bcgit/bc-csharp | |
* GnuTLS - https://gitlab.com/gnutls/gnutls | |
* NaCl - https://nacl.cr.yp.to/install.html |
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 | |
// Code modified from: https://github.com/abdullah2993/go-runpe/blob/master/runpe.go | |
import ( | |
"bytes" | |
"debug/pe" | |
"encoding/binary" | |
"fmt" | |
"syscall" |
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 anon.app.core.security; | |
import anon.market.core.Log; | |
import org.bouncycastle.crypto.engines.AESEngine; | |
import org.bouncycastle.crypto.generators.SCrypt; | |
import org.bouncycastle.crypto.modes.GCMBlockCipher; | |
import org.bouncycastle.crypto.params.AEADParameters; | |
import org.bouncycastle.crypto.params.KeyParameter; | |
import org.bouncycastle.jcajce.provider.digest.SHA3; | |
import javax.ws.rs.WebApplicationException; |
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
REGO is a declarative language used for policy-as-code in the Open Policy Agent (OPA) framework. Here's a concise cheat sheet of popular built-in functions, syntax idioms, and variables in REGO: | |
1. Built-in functions: | |
- Comparison: `eq(x, y)`, `lt(x, y)`, `lte(x, y)`, `gt(x, y)`, `gte(x, y)` | |
- Arithmetic: `add(x, y)`, `sub(x, y)`, `mul(x, y)`, `div(x, y)`, `mod(x, y)` | |
- Logical: `and(x, y)`, `or(x, y)`, `not(x)` | |
- Type Checking: `is_number(x)`, `is_string(x)`, `is_boolean(x)`, `is_array(x)`, `is_set(x)`, `is_object(x)`, `is_null(x)` | |
- Casting: `to_number(x)`, `to_string(x)`, `to_boolean(x)` | |
- Arrays: `count(arr)`, `all(arr, func)`, `any(arr, func)`, `filter(arr, func)`, `map(arr, func)`, `reduce(arr, func, initial)` |
OlderNewer