Changeset 8565a42 in mainline for uspace/lib/crypto/rc4.c
- Timestamp:
- 2018-03-02T20:34:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1a81f69, d5e5fd1
- Parents:
- 3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
- git-committer:
- GitHub <noreply@…> (2018-03-02 20:34:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/crypto/rc4.c
r3061bc1 r8565a42 65 65 for (size_t i = 0; i < SBOX_SIZE; i++) 66 66 sbox[i] = i; 67 67 68 68 uint8_t j = 0; 69 69 for (size_t i = 0; i < SBOX_SIZE; i++) { … … 93 93 if ((!key) || (!input)) 94 94 return EINVAL; 95 95 96 96 if (!output) 97 97 return ENOMEM; 98 98 99 99 /* Initialize sbox. */ 100 100 uint8_t sbox[SBOX_SIZE]; 101 101 create_sbox(key, key_size, sbox); 102 102 103 103 /* Skip first x bytes. */ 104 104 uint8_t i = 0; … … 109 109 swap(i, j, sbox); 110 110 } 111 111 112 112 /* Processing loop. */ 113 113 uint8_t val; … … 119 119 output[k] = val ^ input[k]; 120 120 } 121 121 122 122 return EOK; 123 123 }
Note:
See TracChangeset
for help on using the changeset viewer.