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
// DISCLAIMER: I cannot guarantee that this is secure | |
import { Encryptor } from "./encryptor"; | |
/** | |
* Generates a shared secret and a public key, private key immediatly discarded | |
*/ | |
async function derive( | |
remotePub: ArrayBuffer | |
): Promise<{ key: Uint8Array; pub: Uint8Array; salt: Uint8Array }> { |
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
from os.path import join, dirname | |
from sys import version_info | |
def calculate_module_name(base_file, base_module, path): | |
""" | |
Calculates module name of a target module from base file and relative path | |
:param base_file: Path of the base file (__file__) | |
:type base_file: str |