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
from Crypto.Cipher import PKCS1_OAEP | |
from Crypto.Hash import SHA256 | |
from Crypto.PublicKey import RSA | |
def _xor_arrays(a1: bytes, a2: bytes) -> bytes: | |
return bytes([a ^ b for a, b in zip(a1, a2)]) | |
class RSACipher: |
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
def some_function(some_input: str) -> str: | |
return f"I return '{some_input}', processed in some old way..." |
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 android.os.Bundle | |
import androidx.activity.result.* | |
import androidx.activity.result.contract.ActivityResultContract | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.fragment.app.Fragment | |
import java.lang.RuntimeException | |
import kotlin.reflect.KClass | |
/** |
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
// If collected by WebPack, should be included once. | |
// We have to declare Range and Selection for this code not to break Node.js environment. | |
// We can extend basic types as far as no untrusted third-party libraries are included. | |
declare interface Range { | |
_set_range_in_node (node: HTMLElement, pos?: number); | |
_set_range_start_in_node (node: HTMLElement, pos: number); | |
_set_range_end_in_node (node: HTMLElement, pos: number); | |
_get_range_start_in_node (node: Node): NodeInfo | null; |