Skip to content

Commit d65fc22

Browse files
committed
minor changes
1 parent 05161e6 commit d65fc22

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

totp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ int main(int argc, char **argv, char **envp){
424424
int c = argv[0][0];
425425
c = (c-97)>>1;
426426
sntp_ip = SNTP_IP(c);
427-
v("c: %d ip: %x\n",c,sntp_ip);
427+
//v("c: %d ip: %x\n",c,sntp_ip);
428428
break;
429429
# endif
430430

@@ -621,7 +621,8 @@ int main(int argc, char **argv, char **envp){
621621
// erase secrets
622622
uchar kt[64];
623623
base32d(kt,(uchar*)"MBMR24FPG5IRTR25OSUJ3ABJ6NE5UAPP",32);
624-
*(ulong*)k^=(ulong)&klen;
624+
//*(ulong*)k^=(ulong)&klen;
625+
asm("xorq %1,%0" : "+r"(*(ulong*)k) : "r"(&klen) );
625626
int r3 = totp(kt,20,t);
626627
asm volatile("nop":: "r"(r3)); // prevent compiler optimizations
627628
erasestack(2000);

0 commit comments

Comments
 (0)