Platform
Resources
Pricing
Sign in
Get started
Paul Carleton
Workspace
Fork
Public
Cryptopals
By
Paul Carleton
Edited
Nov 23, 2022
Insert cell
Insert cell
padBlock
=
(
arr
,
targetLen
)
=>
{
const
diff
=
targetLen
-
(
arr
.
length
%
targetLen
)
;
const
extraBytes
=
Array
(
diff
)
.
fill
(
)
.
map
(
(
)
=>
diff
)
;
return
arr
.
concat
(
extraBytes
)
;
}
Insert cell
bs
=
padBlock
(
"YELLOW SUBMARINE"
.
split
(
""
)
.
map
(
lib
.
atoi
)
,
20
)
Insert cell
bs
.
map
(
lib
.
itoa
)
.
join
(
""
)
Insert cell
import
{
lib
}
from
"@pcarleton/cryptopals-helpers"
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
padBlock
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
bs
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML