forked from mykeepass/KeePassLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRandomStreamTest.m
More file actions
35 lines (31 loc) · 793 Bytes
/
RandomStreamTest.m
File metadata and controls
35 lines (31 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// RandomStreamTest.m
// KeePass2
//
// Created by Qiang Yu on 2/28/10.
// Copyright 2010 Qiang Yu. All rights reserved.
//
#import "RandomStreamTest.h"
#import "Arc4RandomStream.h"
#import "Salsa20RandomStream.h"
@implementation RandomStreamTest
- (void) testArc4{
/*uint8_t key[] = {1, 2, 0xa, 4, 5, 6, 7, 8, 9, 0};
Arc4RandomStream * rs = [[Arc4RandomStream alloc]init:key len:10];
uint8_t buffer[32];
[rs readBytes:buffer length:32];
for(int i=0; i<32; i++){
NSLog(@">> %d", buffer[i]);
}*/
}
- (void)testSalsa{
/* uint8_t key[] = {1, 2, 0xa, 4, 5, 6, 7, 8, 9, 0};
Salsa20RandomStream * rs = [[Salsa20RandomStream alloc]init:key len:10];
uint8_t buffer[32];
[rs readBytes:buffer length:32];
for(int i=0; i<32; i++){
NSLog(@">> %d", buffer[i]);
}
*/
}
@end