|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| CipherKey.java | - | 50% | 50% | 50% |
|
||||||||||||||
| 1 | package org.wiztools.wizcrypt; | |
| 2 | ||
| 3 | import javax.crypto.Cipher; | |
| 4 | ||
| 5 | /** | |
| 6 | * This is a Bean like class which just holds data. | |
| 7 | * @see CipherKeyGen | |
| 8 | * @see WizCrypt | |
| 9 | */ | |
| 10 | public final class CipherKey{ | |
| 11 | ||
| 12 | // Disallow external classes to create default instance | |
| 13 | 0 | private CipherKey(){ |
| 14 | 0 | cipher = null; |
| 15 | 0 | passKeyHash = null; |
| 16 | } | |
| 17 | ||
| 18 | /** | |
| 19 | * The only constructor to create CipherKey object. | |
| 20 | * | |
| 21 | * @param cipher The cipher object created using the password. | |
| 22 | * @param passKeyHash The MD5 hash of the password. | |
| 23 | */ | |
| 24 | 7 | public CipherKey(Cipher cipher, byte[] passKeyHash){ |
| 25 | 7 | this.cipher = cipher; |
| 26 | 7 | this.passKeyHash = passKeyHash; |
| 27 | } | |
| 28 | ||
| 29 | /** The cipher object created using the password. */ | |
| 30 | public final Cipher cipher; | |
| 31 | ||
| 32 | /** The MD5 hash of the password. */ | |
| 33 | public final byte[] passKeyHash; | |
| 34 | } |
|
||||||||||