Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ apply_sbox
Function
apply_sbox
other/sdes.py:36–39 ·
view source on GitHub ↗
(s, data)
Source
from the content-addressed store, hash-verified
34
35
36
def
apply_sbox(s, data):
37
row = int(
"0b"
+ data[0] + data[-1], 2)
38
col = int(
"0b"
+ data[1:3], 2)
39
return
bin(s[row][col])[2:]
40
41
42
def
function(expansion, s0, s1, key, message):
Callers
1
function
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected