Skip to content

Commit ab5477b

Browse files
committed
add exports
1 parent b25cef2 commit ab5477b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

onetime.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var characters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', ' ', ',', '.', '?'];
22

33

4-
function encrypt(message, pad) {
4+
export function encrypt(message, pad) {
55
if (pad.length < message.length) {
66
throw "pad not long enough"
77
}
@@ -17,7 +17,7 @@ function encrypt(message, pad) {
1717
}
1818

1919

20-
function decrypt(encryptedMessage, pad) {
20+
export function decrypt(encryptedMessage, pad) {
2121
if (pad.length < encryptedMessage.length) {
2222
throw "pad not long enough"
2323
}
@@ -50,4 +50,3 @@ function fromMod26(number) {
5050

5151
return characters[number];
5252
}
53-

0 commit comments

Comments
 (0)