mirror of
https://github.com/urbit/shrub.git
synced 2025-01-02 09:32:29 +03:00
15 lines
253 B
C
15 lines
253 B
C
#include "urcrypt.h"
|
|
|
|
void
|
|
urcrypt__reverse(size_t size, uint8_t *ptr) {
|
|
if ( size > 0 ) {
|
|
size_t i, j;
|
|
uint8_t tmp;
|
|
for ( i = 0, j = size - 1; i < j; i++, j-- ) {
|
|
tmp = ptr[i];
|
|
ptr[i] = ptr[j];
|
|
ptr[j] = tmp;
|
|
}
|
|
}
|
|
}
|