Package org.smslib.crypto

Examples of org.smslib.crypto.AESKey


      System.out.println();
      // In case you work with encrypted messages, its a good time to declare your keys.
      // Create a new AES Key with a known key value.
      // Register it in KeyManager in order to keep it active. SMSLib will then automatically
      // encrypt / decrypt all messages send to / received from this number.
      Service.getInstance().getKeyManager().registerKey("+306948494037", new AESKey(new SecretKeySpec("0011223344556677".getBytes(), "AES")));
      // Read Messages. The reading is done via the Service object and
      // affects all Gateway objects defined. This can also be more directed to a specific
      // Gateway - look the JavaDocs for information on the Service method calls.
      msgList = new ArrayList<InboundMessage>();
      Service.getInstance().readMessages(msgList, MessageClasses.ALL);
View Full Code Here


    System.out.println();
   
    // Create a new AES Key with a known key value.
    // Register it in KeyManager in order to keep it active. SMSLib will then automatically
    // encrypt / decrypt all messages send to / received from this number.
    Service.getInstance().getKeyManager().registerKey("+306948494037", new AESKey(new SecretKeySpec("0011223344556677".getBytes(), "AES")));

    OutboundEncryptedMessage msg = new OutboundEncryptedMessage("+306948494037", "Hello (encrypted) from SMSLib!".getBytes());
    Service.getInstance().sendMessage(msg);
    System.out.println(msg);
View Full Code Here

TOP

Related Classes of org.smslib.crypto.AESKey

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.