Java Code Examples for org.whispersystems.util.Base64#decodeWithoutPadding()

The following examples show how to use org.whispersystems.util.Base64#decodeWithoutPadding() . 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: JsonUtil.java    From mollyim-android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public IdentityKey deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
  try {
    return new IdentityKey(Base64.decodeWithoutPadding(p.getValueAsString()), 0);
  } catch (InvalidKeyException e) {
    throw new IOException(e);
  }
}
 
Example 2
Source File: JsonUtil.java    From libsignal-service-java with GNU General Public License v3.0 5 votes vote down vote up
@Override
public IdentityKey deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
  try {
    return new IdentityKey(Base64.decodeWithoutPadding(p.getValueAsString()), 0);
  } catch (InvalidKeyException e) {
    throw new IOException(e);
  }
}
 
Example 3
Source File: SignedPreKeyEntity.java    From mollyim-android with GNU General Public License v3.0 4 votes vote down vote up
@Override
public byte[] deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
  return Base64.decodeWithoutPadding(p.getValueAsString());
}
 
Example 4
Source File: SignedPreKeyEntity.java    From libsignal-service-java with GNU General Public License v3.0 4 votes vote down vote up
@Override
public byte[] deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
  return Base64.decodeWithoutPadding(p.getValueAsString());
}