Package org.smslib

Examples of org.smslib.SMSLibException


   * @throws NoSuchAlgorithmException
   */
  public byte[] encrypt(String mobileNumber, byte[] message) throws SMSLibException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, NoSuchPaddingException, NoSuchAlgorithmException
  {
    AKey k = getKey(mobileNumber);
    if (k == null) throw new SMSLibException("Could not find Encryption Key for the specific number.");
    else if (k instanceof ASymmetricKey) return ((ASymmetricKey) k).encrypt(message);
    else return new byte[0];
  }
View Full Code Here


   * @throws NoSuchAlgorithmException
   */
  public byte[] decrypt(String mobileNumber, byte[] message) throws SMSLibException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, NoSuchPaddingException, NoSuchAlgorithmException
  {
    AKey k = getKey(mobileNumber);
    if (k == null) throw new SMSLibException("Could not find Encryption Key for the specific number.");
    else if (k instanceof ASymmetricKey) return ((ASymmetricKey) k).decrypt(message);
    else return new byte[0];
  }
View Full Code Here

TOP

Related Classes of org.smslib.SMSLibException

Copyright © 2018 www.massapicom. 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.