-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added server_identity key in client bundle, refactored EncryptionHeader
- Loading branch information
1 parent
3ec4b47
commit 0b74abd
Showing
7 changed files
with
33 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 7 additions & 36 deletions
43
bundle-core/src/main/java/com/ddd/model/EncryptionHeader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,17 @@ | ||
package com.ddd.model; | ||
|
||
import java.io.File; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
|
||
import java.io.File; | ||
@Data | ||
@Getter | ||
@Builder | ||
public class EncryptionHeader { | ||
private final File serverSignedPreKey; | ||
private final File serverIdentityKey; | ||
private final File serverRatchetKey; | ||
|
||
public File getServerSignedPreKey() { | ||
return this.serverSignedPreKey; | ||
} | ||
|
||
public File getServerIdentityKey() { | ||
return this.serverIdentityKey; | ||
} | ||
|
||
public File getServerRatchetKey() { | ||
return this.serverRatchetKey; | ||
} | ||
|
||
public EncryptionHeader(File serverSignedPreKey, File serverIdentityKey, File serverRatchetKey) { | ||
this.serverSignedPreKey = serverSignedPreKey; | ||
this.serverIdentityKey = serverIdentityKey; | ||
this.serverRatchetKey = serverRatchetKey; | ||
} | ||
|
||
private File clientBaseKey; | ||
private File clientIdentityKey; | ||
|
||
public EncryptionHeader(File clientBaseKey, File clientIdentityKey) { | ||
this.clientBaseKey = clientBaseKey; | ||
this.clientIdentityKey = clientIdentityKey; | ||
this.serverSignedPreKey = null; | ||
this.serverIdentityKey = null; | ||
this.serverRatchetKey = null; | ||
} | ||
|
||
public File getClientBaseKey() { | ||
return clientBaseKey; | ||
} | ||
|
||
public File getClientIdentityKey() { | ||
return clientIdentityKey; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters