|
6 | 6 | // Copyright © 2016 Bitmark. All rights reserved.
|
7 | 7 | //
|
8 | 8 |
|
9 |
| -internal let crypto_secretbox_KEYBYTES = 32 |
10 |
| -internal let crypto_secretbox_NONCEBYTES = 24 |
11 |
| -internal let crypto_secretbox_ZEROBYTES = 32 |
12 |
| -internal let crypto_secretbox_BOXZEROBYTES = 16 |
13 |
| -internal let crypto_scalarmult_BYTES = 32 |
14 |
| -internal let crypto_scalarmult_SCALARBYTES = 32 |
15 |
| -internal let crypto_box_PUBLICKEYBYTES = 32 |
16 |
| -internal let crypto_box_SECRETKEYBYTES = 32 |
17 |
| -internal let crypto_box_BEFORENMBYTES = 32 |
18 |
| -internal let crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES |
19 |
| -internal let crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES |
20 |
| -internal let crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES |
21 |
| -internal let crypto_sign_BYTES = 64 |
22 |
| -internal let crypto_sign_PUBLICKEYBYTES = 32 |
23 |
| -internal let crypto_sign_SECRETKEYBYTES = 64 |
24 |
| -internal let crypto_sign_SEEDBYTES = 32 |
25 |
| -internal let crypto_hash_BYTES = 64 |
| 9 | +struct Constants { |
| 10 | + struct Box { |
| 11 | + static let publicKeyBytes = 32 |
| 12 | + static let secretKeyBytes = 32 |
| 13 | + static let beforeNMBytes = 32 |
| 14 | + static let nonceBytes = Secretbox.nonceBytes |
| 15 | + static let zeroBytes = Secretbox.zeroBytes |
| 16 | + static let boxZeroBytes = Secretbox.boxZeroBytes |
| 17 | + } |
| 18 | + |
| 19 | + struct Hash { |
| 20 | + static let bytes = 64 |
| 21 | + } |
| 22 | + |
| 23 | + struct Scalarmult { |
| 24 | + static let bytes = 32 |
| 25 | + static let scalarBytes = 32 |
| 26 | + } |
| 27 | + |
| 28 | + struct Secretbox { |
| 29 | + static let keyBytes = 32 |
| 30 | + static let nonceBytes = 24 |
| 31 | + static let zeroBytes = 32 |
| 32 | + static let boxZeroBytes = 16 |
| 33 | + } |
| 34 | + |
| 35 | + struct Sign { |
| 36 | + static let bytes = 64 |
| 37 | + static let publicKeyBytes = 32 |
| 38 | + static let secretKeyBytes = 64 |
| 39 | + static let seedBytes = 32 |
| 40 | + } |
| 41 | +} |
0 commit comments