Java Code Examples for org.whispersystems.libsignal.state.SignedPreKeyRecord#getSignature()
The following examples show how to use
org.whispersystems.libsignal.state.SignedPreKeyRecord#getSignature() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PushServiceSocket.java From mollyim-android with GNU General Public License v3.0 | 6 votes |
public void registerPreKeys(IdentityKey identityKey, SignedPreKeyRecord signedPreKey, List<PreKeyRecord> records) throws IOException { List<PreKeyEntity> entities = new LinkedList<>(); for (PreKeyRecord record : records) { PreKeyEntity entity = new PreKeyEntity(record.getId(), record.getKeyPair().getPublicKey()); entities.add(entity); } SignedPreKeyEntity signedPreKeyEntity = new SignedPreKeyEntity(signedPreKey.getId(), signedPreKey.getKeyPair().getPublicKey(), signedPreKey.getSignature()); makeServiceRequest(String.format(PREKEY_PATH, ""), "PUT", JsonUtil.toJson(new PreKeyState(entities, signedPreKeyEntity, identityKey))); }
Example 2
Source File: PushServiceSocket.java From libsignal-service-java with GNU General Public License v3.0 | 6 votes |
public void registerPreKeys(IdentityKey identityKey, SignedPreKeyRecord signedPreKey, List<PreKeyRecord> records) throws IOException { List<PreKeyEntity> entities = new LinkedList<>(); for (PreKeyRecord record : records) { PreKeyEntity entity = new PreKeyEntity(record.getId(), record.getKeyPair().getPublicKey()); entities.add(entity); } SignedPreKeyEntity signedPreKeyEntity = new SignedPreKeyEntity(signedPreKey.getId(), signedPreKey.getKeyPair().getPublicKey(), signedPreKey.getSignature()); makeServiceRequest(String.format(PREKEY_PATH, ""), "PUT", JsonUtil.toJson(new PreKeyState(entities, signedPreKeyEntity, identityKey))); }
Example 3
Source File: PushServiceSocket.java From mollyim-android with GNU General Public License v3.0 | 4 votes |
public void setCurrentSignedPreKey(SignedPreKeyRecord signedPreKey) throws IOException { SignedPreKeyEntity signedPreKeyEntity = new SignedPreKeyEntity(signedPreKey.getId(), signedPreKey.getKeyPair().getPublicKey(), signedPreKey.getSignature()); makeServiceRequest(SIGNED_PREKEY_PATH, "PUT", JsonUtil.toJson(signedPreKeyEntity)); }
Example 4
Source File: PushServiceSocket.java From libsignal-service-java with GNU General Public License v3.0 | 4 votes |
public void setCurrentSignedPreKey(SignedPreKeyRecord signedPreKey) throws IOException { SignedPreKeyEntity signedPreKeyEntity = new SignedPreKeyEntity(signedPreKey.getId(), signedPreKey.getKeyPair().getPublicKey(), signedPreKey.getSignature()); makeServiceRequest(SIGNED_PREKEY_PATH, "PUT", JsonUtil.toJson(signedPreKeyEntity)); }
Example 5
Source File: SignalOmemoKeyUtil.java From Smack with Apache License 2.0 | 4 votes |
@Override public byte[] signedPreKeySignatureFromKey(SignedPreKeyRecord signedPreKey) { return signedPreKey.getSignature(); }