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 libc.string cimport strlen | |
cdef class RC4: | |
cdef list _sbox | |
cdef bytes _key | |
def __init__(self, char* key): | |
cdef int index = 0 | |
self._sbox = list(range(256)) | |
self._key = bytes(key) |
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
import os | |
import uuid | |
import Command | |
import subprocess | |
from Security import AccessLevels | |
from Command.BaseCommand import BaseCommand | |
from Command.Server.DriveUtility import DriveUtility | |
from Configuration.BaseConfiguration import BaseConfiguration |
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
class JsGiffer: | |
def __init__(self, image_file, script_file): | |
self._image_file = image_file | |
self._script_file = script_file | |
# Defines the gif header. "GIF89a" in ASCII | |
self._gif_header = b"\x47\x49\x46\x38\x39\x61" | |
# Sets the gif height and width. "/*/*" in ASCII. Wraps the gif content in a JavaScript comment | |
self._gif_header += b"\x2f\x2a\x2f\x2a" | |
# Defines the Javascript comment closing tag use for this gif. "*/" in ASCII |
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
import sys | |
import time | |
import socket | |
class RC4: | |
def __init__(self, key): | |
self.key = [ord(c) for c in key] | |
self._sbox = [] | |
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 TransportSecurity | |
import "io" | |
import "math/big" | |
import "crypto/aes" | |
import "crypto/rand" | |
import "crypto/sha512" | |
import "crypto/cipher" | |
import "crypto/elliptic" | |
import "encoding/base64" |
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 | |
import "fmt" | |
import "math/big" | |
import "crypto/rand" | |
import "crypto/elliptic" | |
import "encoding/base64" | |
type HandshakeObj struct { |
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
<# | |
This script contains a pure PowerShell implementation of AEAD_RC6_32/20/32_OCB_TAGLEN128 | |
Full specifications, RFCs, and other additional information is provided in the comments | |
as-needed in the form of links to the original documents. | |
#> | |
# Set ErrorActionPreference to STOP to ensure PowerShell terminates on encountering an exception | |
# $ErrorActionPreference = "STOP" | |
# XOR function designed to work with the 128-bit blocks used by OCB |