Class DesCrypt


  • public class DesCrypt
    extends java.lang.Object
    Utility class for doing DESded (3DES) Two-Way Encryption
    • Constructor Summary

      Constructors 
      Constructor Description
      DesCrypt()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] decrypt​(java.security.Key key, byte[] bytes)  
      static byte[] encrypt​(java.security.Key key, byte[] bytes)  
      static java.security.Key generateKey()  
      protected static javax.crypto.Cipher getCipher​(java.security.Key key, int mode, javax.crypto.spec.IvParameterSpec iv)  
      static java.security.Key getDesKey​(byte[] rawKey)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DesCrypt

        public DesCrypt()
    • Method Detail

      • generateKey

        public static java.security.Key generateKey()
                                             throws java.security.NoSuchAlgorithmException
        Throws:
        java.security.NoSuchAlgorithmException
      • getCipher

        protected static javax.crypto.Cipher getCipher​(java.security.Key key,
                                                       int mode,
                                                       javax.crypto.spec.IvParameterSpec iv)
                                                throws GeneralException
        Throws:
        GeneralException