Package org.smslib.crypto

Examples of org.smslib.crypto.KeyManager.decrypt()


  }

  public String getDecryptedText() throws SMSLibException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, NoSuchPaddingException, NoSuchAlgorithmException
  {
    KeyManager km = KeyManager.getInstance();
    if (km.getKey(getOriginator()) != null) setDataBytes(km.decrypt(getOriginator(), getDataBytes()));
    else throw new SMSLibException("Message is not encrypted, have you defined the key in KeyManager?");
    return AKey.asString(getDataBytes());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.