diff --git a/utilities/aes-gcm-java-utility/.gitignore b/utilities/aes-gcm-java-utility/.gitignore new file mode 100644 index 00000000..de02ddaf --- /dev/null +++ b/utilities/aes-gcm-java-utility/.gitignore @@ -0,0 +1,6 @@ +target +.DS_Store +.classpath +.project +.settings +.vscode \ No newline at end of file diff --git a/utilities/docs/allclasses-index.html b/utilities/aes-gcm-java-utility/docs/allclasses-index.html similarity index 64% rename from utilities/docs/allclasses-index.html rename to utilities/aes-gcm-java-utility/docs/allclasses-index.html index b3532960..74e01d02 100644 --- a/utilities/docs/allclasses-index.html +++ b/utilities/aes-gcm-java-utility/docs/allclasses-index.html @@ -1,18 +1,18 @@ - + All Classes and Interfaces - + - + @@ -28,10 +28,10 @@ diff --git a/utilities/docs/allpackages-index.html b/utilities/aes-gcm-java-utility/docs/allpackages-index.html similarity index 83% rename from utilities/docs/allpackages-index.html rename to utilities/aes-gcm-java-utility/docs/allpackages-index.html index 2a26cadc..841ba4aa 100644 --- a/utilities/docs/allpackages-index.html +++ b/utilities/aes-gcm-java-utility/docs/allpackages-index.html @@ -1,18 +1,18 @@ - + All Packages - + - + @@ -28,10 +28,10 @@ diff --git a/utilities/aes-gcm-java-utility/docs/index-files/index-9.html b/utilities/aes-gcm-java-utility/docs/index-files/index-9.html new file mode 100644 index 00000000..9ae44b66 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/index-files/index-9.html @@ -0,0 +1,69 @@ + + + + +T-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A D E G I K M O T 
All Classes and Interfaces|All Packages|Constant Field Values +

T

+
+
toBase64String() - Method in class org.ondc.EncryptionUtil.EncryptionPayload
+
+
A Method to convert this instance of a class to base64 string.
+
+
toString() - Method in class org.ondc.KeyUtil.DHKeyPair
+
+
String Formatting.
+
+
+A D E G I K M O T 
All Classes and Interfaces|All Packages|Constant Field Values
+
+
+ + diff --git a/utilities/docs/index.html b/utilities/aes-gcm-java-utility/docs/index.html similarity index 61% rename from utilities/docs/index.html rename to utilities/aes-gcm-java-utility/docs/index.html index dfdba159..9ecf14b9 100644 --- a/utilities/docs/index.html +++ b/utilities/aes-gcm-java-utility/docs/index.html @@ -1,18 +1,18 @@ - + Generated Documentation (Untitled) - + - + - + @@ -20,7 +20,7 @@ -

org/ondc/crypto/util/package-summary.html

+

org/ondc/package-summary.html

diff --git a/utilities/aes-gcm-java-utility/docs/jquery-ui.overrides.css b/utilities/aes-gcm-java-utility/docs/jquery-ui.overrides.css new file mode 100644 index 00000000..03c010ba --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/jquery-ui.overrides.css @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; + border: 1px solid #F8981D; +} diff --git a/utilities/docs/legal/ADDITIONAL_LICENSE_INFO b/utilities/aes-gcm-java-utility/docs/legal/ADDITIONAL_LICENSE_INFO similarity index 100% rename from utilities/docs/legal/ADDITIONAL_LICENSE_INFO rename to utilities/aes-gcm-java-utility/docs/legal/ADDITIONAL_LICENSE_INFO diff --git a/utilities/docs/legal/ASSEMBLY_EXCEPTION b/utilities/aes-gcm-java-utility/docs/legal/ASSEMBLY_EXCEPTION similarity index 100% rename from utilities/docs/legal/ASSEMBLY_EXCEPTION rename to utilities/aes-gcm-java-utility/docs/legal/ASSEMBLY_EXCEPTION diff --git a/utilities/aes-gcm-java-utility/docs/legal/COPYRIGHT b/utilities/aes-gcm-java-utility/docs/legal/COPYRIGHT new file mode 100644 index 00000000..945e19c1 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/legal/COPYRIGHT @@ -0,0 +1,69 @@ +Copyright © 1993, 2018, Oracle and/or its affiliates. +All rights reserved. + +This software and related documentation are provided under a +license agreement containing restrictions on use and +disclosure and are protected by intellectual property laws. +Except as expressly permitted in your license agreement or +allowed by law, you may not use, copy, reproduce, translate, +broadcast, modify, license, transmit, distribute, exhibit, +perform, publish, or display any part, in any form, or by +any means. Reverse engineering, disassembly, or +decompilation of this software, unless required by law for +interoperability, is prohibited. + +The information contained herein is subject to change +without notice and is not warranted to be error-free. If you +find any errors, please report them to us in writing. + +If this is software or related documentation that is +delivered to the U.S. Government or anyone licensing it on +behalf of the U.S. Government, the following notice is +applicable: + +U.S. GOVERNMENT END USERS: Oracle programs, including any +operating system, integrated software, any programs +installed on the hardware, and/or documentation, delivered +to U.S. Government end users are "commercial computer +software" pursuant to the applicable Federal Acquisition +Regulation and agency-specific supplemental regulations. As +such, use, duplication, disclosure, modification, and +adaptation of the programs, including any operating system, +integrated software, any programs installed on the hardware, +and/or documentation, shall be subject to license terms and +license restrictions applicable to the programs. No other +rights are granted to the U.S. Government. + +This software or hardware is developed for general use in a +variety of information management applications. It is not +developed or intended for use in any inherently dangerous +applications, including applications that may create a risk +of personal injury. If you use this software or hardware in +dangerous applications, then you shall be responsible to +take all appropriate fail-safe, backup, redundancy, and +other measures to ensure its safe use. Oracle Corporation +and its affiliates disclaim any liability for any damages +caused by use of this software or hardware in dangerous +applications. + +Oracle and Java are registered trademarks of Oracle and/or +its affiliates. Other names may be trademarks of their +respective owners. + +Intel and Intel Xeon are trademarks or registered trademarks +of Intel Corporation. All SPARC trademarks are used under +license and are trademarks or registered trademarks of SPARC +International, Inc. AMD, Opteron, the AMD logo, and the AMD +Opteron logo are trademarks or registered trademarks of +Advanced Micro Devices. UNIX is a registered trademark of +The Open Group. + +This software or hardware and documentation may provide +access to or information on content, products, and services +from third parties. Oracle Corporation and its affiliates +are not responsible for and expressly disclaim all +warranties of any kind with respect to third-party content, +products, and services. Oracle Corporation and its +affiliates will not be responsible for any loss, costs, or +damages incurred due to your access to or use of third-party +content, products, or services. diff --git a/utilities/aes-gcm-java-utility/docs/legal/LICENSE b/utilities/aes-gcm-java-utility/docs/legal/LICENSE new file mode 100644 index 00000000..ee860d38 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/legal/LICENSE @@ -0,0 +1,118 @@ +Your use of this Program is governed by the No-Fee Terms and Conditions set +forth below, unless you have received this Program (alone or as part of another +Oracle product) under an Oracle license agreement (including but not limited to +the Oracle Master Agreement), in which case your use of this Program is governed +solely by such license agreement with Oracle. + +Oracle No-Fee Terms and Conditions (NFTC) + +Definitions + +"Oracle" refers to Oracle America, Inc. "You" and "Your" refers to (a) a company +or organization (each an "Entity") accessing the Programs, if use of the +Programs will be on behalf of such Entity; or (b) an individual accessing the +Programs, if use of the Programs will not be on behalf of an Entity. +"Program(s)" refers to Oracle software provided by Oracle pursuant to the +following terms and any updates, error corrections, and/or Program Documentation +provided by Oracle. "Program Documentation" refers to Program user manuals and +Program installation manuals, if any. If available, Program Documentation may be +delivered with the Programs and/or may be accessed from +www.oracle.com/documentation. "Separate Terms" refers to separate license terms +that are specified in the Program Documentation, readmes or notice files and +that apply to Separately Licensed Technology. "Separately Licensed Technology" +refers to Oracle or third party technology that is licensed under Separate Terms +and not under the terms of this license. + +Separately Licensed Technology + +Oracle may provide certain notices to You in Program Documentation, readmes or +notice files in connection with Oracle or third party technology provided as or +with the Programs. If specified in the Program Documentation, readmes or notice +files, such technology will be licensed to You under Separate Terms. Your rights +to use Separately Licensed Technology under Separate Terms are not restricted in +any way by the terms herein. For clarity, notwithstanding the existence of a +notice, third party technology that is not Separately Licensed Technology shall +be deemed part of the Programs licensed to You under the terms of this license. + +Source Code for Open Source Software + +For software that You receive from Oracle in binary form that is licensed under +an open source license that gives You the right to receive the source code for +that binary, You can obtain a copy of the applicable source code from +https://oss.oracle.com/sources/ or http://www.oracle.com/goto/opensourcecode. If +the source code for such software was not provided to You with the binary, You +can also receive a copy of the source code on physical media by submitting a +written request pursuant to the instructions in the "Written Offer for Source +Code" section of the latter website. + +------------------------------------------------------------------------------- + +The following license terms apply to those Programs that are not provided to You +under Separate Terms. + +License Rights and Restrictions + +Oracle grants to You, as a recipient of this Program, subject to the conditions +stated herein, a nonexclusive, nontransferable, limited license to: + +(a) internally use the unmodified Programs for the purposes of developing, +testing, prototyping and demonstrating your applications, and running the +Program for Your own personal use or internal business operations; and + +(b) redistribute the unmodified Program and Program Documentation, under the +terms of this License, provided that You do not charge Your licensees any fees +associated with such distribution or use of the Program, including, without +limitation, fees for products that include or are bundled with a copy of the +Program or for services that involve the use of the distributed Program. + +You may make copies of the Programs to the extent reasonably necessary for +exercising the license rights granted herein and for backup purposes. You are +granted the right to use the Programs to provide third party training in the use +of the Programs and associated Separately Licensed Technology only if there is +express authorization of such use by Oracle on the Program's download page or in +the Program Documentation. + +Your license is contingent on compliance with the following conditions: + +- You do not remove markings or notices of either Oracle's or a licensor's + proprietary rights from the Programs or Program Documentation; + +- You comply with all U.S. and applicable export control and economic sanctions + laws and regulations that govern Your use of the Programs (including technical + data); + +- You do not cause or permit reverse engineering, disassembly or decompilation + of the Programs (except as allowed by law) by You nor allow an associated + party to do so. + +For clarity, any source code that may be included in the distribution with the +Programs is provided solely for reference purposes and may not be modified, +unless such source code is under Separate Terms permitting modification. + +Ownership + +Oracle or its licensors retain all ownership and intellectual property rights to +the Programs. + +Information Collection + +The Programs' installation and/or auto-update processes, if any, may transmit a +limited amount of data to Oracle or its service provider about those processes +to help Oracle understand and optimize them. Oracle does not associate the data +with personally identifiable information. Refer to Oracle's Privacy Policy at +www.oracle.com/privacy. + +Disclaimer of Warranties; Limitation of Liability + +THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER +DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NONINFRINGEMENT. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ORACLE BE LIABLE TO YOU FOR +DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT +LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/utilities/docs/legal/jquery.md b/utilities/aes-gcm-java-utility/docs/legal/jquery.md similarity index 94% rename from utilities/docs/legal/jquery.md rename to utilities/aes-gcm-java-utility/docs/legal/jquery.md index 8054a34c..d468b318 100644 --- a/utilities/docs/legal/jquery.md +++ b/utilities/aes-gcm-java-utility/docs/legal/jquery.md @@ -1,9 +1,9 @@ -## jQuery v3.5.1 +## jQuery v3.6.1 ### jQuery License ``` -jQuery v 3.5.1 -Copyright JS Foundation and other contributors, https://js.foundation/ +jQuery v 3.6.1 +Copyright OpenJS Foundation and other contributors, https://openjsf.org/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************** -The jQuery JavaScript Library v3.5.1 also includes Sizzle.js +The jQuery JavaScript Library v3.6.1 also includes Sizzle.js Sizzle.js includes the following license: diff --git a/utilities/docs/legal/jqueryUI.md b/utilities/aes-gcm-java-utility/docs/legal/jqueryUI.md similarity index 100% rename from utilities/docs/legal/jqueryUI.md rename to utilities/aes-gcm-java-utility/docs/legal/jqueryUI.md diff --git a/utilities/aes-gcm-java-utility/docs/member-search-index.js b/utilities/aes-gcm-java-utility/docs/member-search-index.js new file mode 100644 index 00000000..8a7bddb0 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"org.ondc","c":"App","l":"App()","u":"%3Cinit%3E()"},{"p":"org.ondc","c":"EncryptionUtil","l":"AUTH_TAG_BIT_LENGTH"},{"p":"org.ondc","c":"EncryptionUtil","l":"decryptData(String, String)","u":"decryptData(java.lang.String,java.lang.String)"},{"p":"org.ondc","c":"KeyUtil.DHKeyPair","l":"DHKeyPair(KeyPair)","u":"%3Cinit%3E(java.security.KeyPair)"},{"p":"org.ondc","c":"EncryptionUtil","l":"encryptData(String, String)","u":"encryptData(java.lang.String,java.lang.String)"},{"p":"org.ondc","c":"EncryptionUtil.EncryptionPayload","l":"EncryptionPayload()","u":"%3Cinit%3E()"},{"p":"org.ondc","c":"KeyUtil","l":"generateKeyPair()"},{"p":"org.ondc","c":"KeyUtil","l":"generateSharedKey(String, String)","u":"generateSharedKey(java.lang.String,java.lang.String)"},{"p":"org.ondc","c":"EncryptionUtil.EncryptionPayload","l":"getEncrypedData()"},{"p":"org.ondc","c":"EncryptionUtil.EncryptionPayload","l":"getHmac()"},{"p":"org.ondc","c":"EncryptionUtil.EncryptionPayload","l":"getNonce()"},{"p":"org.ondc","c":"KeyUtil.DHKeyPair","l":"getPrivateKey()"},{"p":"org.ondc","c":"KeyUtil.DHKeyPair","l":"getPublicKey()"},{"p":"org.ondc","c":"EncryptionUtil","l":"IV_BIT_LENGTH"},{"p":"org.ondc","c":"KeyUtil","l":"KEYPAIR_GENERATION_ALGORITHM"},{"p":"org.ondc","c":"App","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"org.ondc","c":"EncryptionUtil.EncryptionPayload","l":"toBase64String()"},{"p":"org.ondc","c":"KeyUtil.DHKeyPair","l":"toString()"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/docs/module-search-index.js b/utilities/aes-gcm-java-utility/docs/module-search-index.js similarity index 100% rename from utilities/docs/module-search-index.js rename to utilities/aes-gcm-java-utility/docs/module-search-index.js diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/App.html b/utilities/aes-gcm-java-utility/docs/org/ondc/App.html new file mode 100644 index 00000000..162a5f1a --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/App.html @@ -0,0 +1,166 @@ + + + + +App + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.ondc
+

Class App

+
+
java.lang.Object +
org.ondc.App
+
+
+
+
public class App +extends Object
+
Class depicting the usage of the utility.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    App()
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static void
    +
    main(String[] args)
    +
    +
    Main Function.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      App

      +
      public App()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      main

      +
      public static void main(String[] args)
      +
      Main Function.
      +
      +
      Parameters:
      +
      args - Main Function Args.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/EncryptionUtil.EncryptionPayload.html b/utilities/aes-gcm-java-utility/docs/org/ondc/EncryptionUtil.EncryptionPayload.html new file mode 100644 index 00000000..6d1b7ec3 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/EncryptionUtil.EncryptionPayload.html @@ -0,0 +1,218 @@ + + + + +EncryptionUtil.EncryptionPayload + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.ondc
+

Class EncryptionUtil.EncryptionPayload

+
+
java.lang.Object +
org.ondc.EncryptionUtil.EncryptionPayload
+
+
+
+
Enclosing class:
+
EncryptionUtil
+
+
+
public static class EncryptionUtil.EncryptionPayload +extends Object
+
The POJO class for Encrypted Data.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EncryptionPayload

      +
      public EncryptionPayload()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getEncrypedData

      +
      public String getEncrypedData()
      +
      Gets the Encrypted Data
      +
      +
      Returns:
      +
      The Encrypted Data.
      +
      +
      +
    • +
    • +
      +

      getNonce

      +
      public String getNonce()
      +
      Gets the Nonce.
      +
      +
      Returns:
      +
      The Nonce.
      +
      +
      +
    • +
    • +
      +

      getHmac

      +
      public String getHmac()
      +
      Gets the HMAC.
      +
      +
      Returns:
      +
      The HMAC.
      +
      +
      +
    • +
    • +
      +

      toBase64String

      +
      public String toBase64String()
      +
      A Method to convert this instance of a class to base64 string.
      +
      +
      Returns:
      +
      Base64 Encoded string of the object.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/EncryptionUtil.html b/utilities/aes-gcm-java-utility/docs/org/ondc/EncryptionUtil.html new file mode 100644 index 00000000..b5b0e9ee --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/EncryptionUtil.html @@ -0,0 +1,242 @@ + + + + +EncryptionUtil + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.ondc
+

Class EncryptionUtil

+
+
java.lang.Object +
org.ondc.EncryptionUtil
+
+
+
+
public class EncryptionUtil +extends Object
+
Utility class for encrypting and decrypting payload.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Class
    +
    Description
    +
    static class 
    + +
    +
    The POJO class for Encrypted Data.
    +
    +
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final int
    + +
    +
    The standard authentication tag length (128 bits).
    +
    +
    static final int
    + +
    +
    The standard Initialization Vector (IV) length (96 bits).
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static String
    +
    decryptData(String key, + String eData)
    +
    +
    Decrypts the Encrypted Data using Shared Key.
    +
    +
    static String
    +
    encryptData(String key, + String data)
    +
    +
    Encrypts the specified plain text using AES/GCM/NoPadding.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      IV_BIT_LENGTH

      +
      public static final int IV_BIT_LENGTH
      +
      The standard Initialization Vector (IV) length (96 bits).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      AUTH_TAG_BIT_LENGTH

      +
      public static final int AUTH_TAG_BIT_LENGTH
      +
      The standard authentication tag length (128 bits).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      encryptData

      +
      public static String encryptData(String key, + String data)
      +
      Encrypts the specified plain text using AES/GCM/NoPadding.
      +
      +
      Parameters:
      +
      key - The Shared Key.
      +
      data - The Raw Data to be Encrypted.
      +
      Returns:
      +
      The Encrypted data in base64 encoded format.
      +
      +
      +
    • +
    • +
      +

      decryptData

      +
      public static String decryptData(String key, + String eData)
      +
      Decrypts the Encrypted Data using Shared Key.
      +
      +
      Parameters:
      +
      key - The Shared Key.
      +
      eData - The Encrypted Data.
      +
      Returns:
      +
      The Raw Decrypted data.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/KeyUtil.DHKeyPair.html b/utilities/aes-gcm-java-utility/docs/org/ondc/KeyUtil.DHKeyPair.html new file mode 100644 index 00000000..e520676f --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/KeyUtil.DHKeyPair.html @@ -0,0 +1,209 @@ + + + + +KeyUtil.DHKeyPair + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.ondc
+

Class KeyUtil.DHKeyPair

+
+
java.lang.Object +
org.ondc.KeyUtil.DHKeyPair
+
+
+
+
Enclosing class:
+
KeyUtil
+
+
+
public static class KeyUtil.DHKeyPair +extends Object
+
POJO class for storing private and public keys.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DHKeyPair

      +
      public DHKeyPair(KeyPair keyPair)
      +
      Constructor
      +
      +
      Parameters:
      +
      keyPair - Instance of java.security.KeyPair Class.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPublicKey

      +
      public String getPublicKey()
      +
      Gets the Public Key.
      +
      +
      Returns:
      +
      Public Key.
      +
      +
      +
    • +
    • +
      +

      getPrivateKey

      +
      public String getPrivateKey()
      +
      Gets the Private Key.
      +
      +
      Returns:
      +
      Private Key.
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      String Formatting.
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/KeyUtil.html b/utilities/aes-gcm-java-utility/docs/org/ondc/KeyUtil.html new file mode 100644 index 00000000..e16b783b --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/KeyUtil.html @@ -0,0 +1,217 @@ + + + + +KeyUtil + + + + + + + + + + + + + + + +
+ +
+
+ +
+
Package org.ondc
+

Class KeyUtil

+
+
java.lang.Object +
org.ondc.KeyUtil
+
+
+
+
public class KeyUtil +extends Object
+
Utility Class to Generate Keypairs and Shared Key.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      KEYPAIR_GENERATION_ALGORITHM

      +
      public static final String KEYPAIR_GENERATION_ALGORITHM
      +
      The Algorithm used to generate Key pairs. ("X25519").
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      generateKeyPair

      +
      public static KeyUtil.DHKeyPair generateKeyPair()
      +
      Generate a Keypair.
      +
      +
      Returns:
      +
      Generated Keypair.
      +
      +
      +
    • +
    • +
      +

      generateSharedKey

      +
      public static String generateSharedKey(String privateKeyStr, + String publicKeyStr)
      +
      Generates a SharedKey.
      +
      +
      Parameters:
      +
      privateKeyStr - Private Key of one party.
      +
      publicKeyStr - Public Key of the other party.
      +
      Returns:
      +
      Shared key as base64 string.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/App.html b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/App.html new file mode 100644 index 00000000..a1360138 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/App.html @@ -0,0 +1,57 @@ + + + + +Uses of Class org.ondc.App + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.ondc.App

+
+No usage of org.ondc.App
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/EncryptionUtil.EncryptionPayload.html b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/EncryptionUtil.EncryptionPayload.html new file mode 100644 index 00000000..72b24c7a --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/EncryptionUtil.EncryptionPayload.html @@ -0,0 +1,57 @@ + + + + +Uses of Class org.ondc.EncryptionUtil.EncryptionPayload + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.ondc.EncryptionUtil.EncryptionPayload

+
+No usage of org.ondc.EncryptionUtil.EncryptionPayload
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/EncryptionUtil.html b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/EncryptionUtil.html new file mode 100644 index 00000000..dbaeb3eb --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/EncryptionUtil.html @@ -0,0 +1,57 @@ + + + + +Uses of Class org.ondc.EncryptionUtil + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.ondc.EncryptionUtil

+
+No usage of org.ondc.EncryptionUtil
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/KeyUtil.DHKeyPair.html b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/KeyUtil.DHKeyPair.html new file mode 100644 index 00000000..eb9c932b --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/KeyUtil.DHKeyPair.html @@ -0,0 +1,77 @@ + + + + +Uses of Class org.ondc.KeyUtil.DHKeyPair + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.ondc.KeyUtil.DHKeyPair

+
+
+ +
+
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/KeyUtil.html b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/KeyUtil.html new file mode 100644 index 00000000..2115f544 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/class-use/KeyUtil.html @@ -0,0 +1,57 @@ + + + + +Uses of Class org.ondc.KeyUtil + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.ondc.KeyUtil

+
+No usage of org.ondc.KeyUtil
+
+
+ + diff --git a/utilities/docs/org/ondc/crypto/util/CryptoFunctions.html b/utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/CryptoFunctions.html similarity index 100% rename from utilities/docs/org/ondc/crypto/util/CryptoFunctions.html rename to utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/CryptoFunctions.html diff --git a/utilities/docs/org/ondc/crypto/util/CryptoKeyPair.html b/utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/CryptoKeyPair.html similarity index 100% rename from utilities/docs/org/ondc/crypto/util/CryptoKeyPair.html rename to utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/CryptoKeyPair.html diff --git a/utilities/docs/org/ondc/crypto/util/CryptoTest.html b/utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/CryptoTest.html similarity index 100% rename from utilities/docs/org/ondc/crypto/util/CryptoTest.html rename to utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/CryptoTest.html diff --git a/utilities/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html b/utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html similarity index 100% rename from utilities/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html rename to utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html diff --git a/utilities/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html b/utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html similarity index 100% rename from utilities/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html rename to utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html diff --git a/utilities/docs/org/ondc/crypto/util/class-use/CryptoTest.html b/utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/class-use/CryptoTest.html similarity index 100% rename from utilities/docs/org/ondc/crypto/util/class-use/CryptoTest.html rename to utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/class-use/CryptoTest.html diff --git a/utilities/docs/org/ondc/crypto/util/package-summary.html b/utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/package-summary.html similarity index 100% rename from utilities/docs/org/ondc/crypto/util/package-summary.html rename to utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/package-summary.html diff --git a/utilities/docs/org/ondc/crypto/util/package-tree.html b/utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/package-tree.html similarity index 100% rename from utilities/docs/org/ondc/crypto/util/package-tree.html rename to utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/package-tree.html diff --git a/utilities/docs/org/ondc/crypto/util/package-use.html b/utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/package-use.html similarity index 100% rename from utilities/docs/org/ondc/crypto/util/package-use.html rename to utilities/aes-gcm-java-utility/docs/org/ondc/crypto/util/package-use.html diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/package-summary.html b/utilities/aes-gcm-java-utility/docs/org/ondc/package-summary.html new file mode 100644 index 00000000..f37adebd --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/package-summary.html @@ -0,0 +1,100 @@ + + + + +org.ondc + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.ondc

+
+
+
package org.ondc
+
+
    +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
    +
    Class depicting the usage of the utility.
    +
    + +
    +
    Utility class for encrypting and decrypting payload.
    +
    + +
    +
    The POJO class for Encrypted Data.
    +
    + +
    +
    Utility Class to Generate Keypairs and Shared Key.
    +
    + +
    +
    POJO class for storing private and public keys.
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/package-tree.html b/utilities/aes-gcm-java-utility/docs/org/ondc/package-tree.html new file mode 100644 index 00000000..5781279c --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/package-tree.html @@ -0,0 +1,71 @@ + + + + +org.ondc Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.ondc

+
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/utilities/aes-gcm-java-utility/docs/org/ondc/package-use.html b/utilities/aes-gcm-java-utility/docs/org/ondc/package-use.html new file mode 100644 index 00000000..bc9578c7 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/org/ondc/package-use.html @@ -0,0 +1,74 @@ + + + + +Uses of Package org.ondc + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.ondc

+
+
+ +
+
+
+
+ + diff --git a/utilities/docs/overview-tree.html b/utilities/aes-gcm-java-utility/docs/overview-tree.html similarity index 66% rename from utilities/docs/overview-tree.html rename to utilities/aes-gcm-java-utility/docs/overview-tree.html index d775267f..d0267251 100644 --- a/utilities/docs/overview-tree.html +++ b/utilities/aes-gcm-java-utility/docs/overview-tree.html @@ -1,18 +1,18 @@ - + Class Hierarchy - + - + @@ -51,17 +51,19 @@

Hierarchy For All Packages

Package Hierarchies:

Class Hierarchy

diff --git a/utilities/docs/package-search-index.js b/utilities/aes-gcm-java-utility/docs/package-search-index.js similarity index 51% rename from utilities/docs/package-search-index.js rename to utilities/aes-gcm-java-utility/docs/package-search-index.js index 7fe94cec..bb81a311 100644 --- a/utilities/docs/package-search-index.js +++ b/utilities/aes-gcm-java-utility/docs/package-search-index.js @@ -1 +1 @@ -packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"org.ondc.crypto.util"}];updateSearchResults(); \ No newline at end of file +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"org.ondc"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/docs/resources/glass.png b/utilities/aes-gcm-java-utility/docs/resources/glass.png similarity index 100% rename from utilities/docs/resources/glass.png rename to utilities/aes-gcm-java-utility/docs/resources/glass.png diff --git a/utilities/docs/resources/x.png b/utilities/aes-gcm-java-utility/docs/resources/x.png similarity index 100% rename from utilities/docs/resources/x.png rename to utilities/aes-gcm-java-utility/docs/resources/x.png diff --git a/utilities/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png similarity index 100% rename from utilities/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png diff --git a/utilities/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png similarity index 100% rename from utilities/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png diff --git a/utilities/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png similarity index 100% rename from utilities/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png diff --git a/utilities/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png similarity index 100% rename from utilities/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png diff --git a/utilities/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png similarity index 100% rename from utilities/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png diff --git a/utilities/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png similarity index 100% rename from utilities/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png diff --git a/utilities/docs/script-dir/images/ui-icons_222222_256x240.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_222222_256x240.png similarity index 100% rename from utilities/docs/script-dir/images/ui-icons_222222_256x240.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_222222_256x240.png diff --git a/utilities/docs/script-dir/images/ui-icons_2e83ff_256x240.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_2e83ff_256x240.png similarity index 100% rename from utilities/docs/script-dir/images/ui-icons_2e83ff_256x240.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_2e83ff_256x240.png diff --git a/utilities/docs/script-dir/images/ui-icons_454545_256x240.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_454545_256x240.png similarity index 100% rename from utilities/docs/script-dir/images/ui-icons_454545_256x240.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_454545_256x240.png diff --git a/utilities/docs/script-dir/images/ui-icons_888888_256x240.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_888888_256x240.png similarity index 100% rename from utilities/docs/script-dir/images/ui-icons_888888_256x240.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_888888_256x240.png diff --git a/utilities/docs/script-dir/images/ui-icons_cd0a0a_256x240.png b/utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_cd0a0a_256x240.png similarity index 100% rename from utilities/docs/script-dir/images/ui-icons_cd0a0a_256x240.png rename to utilities/aes-gcm-java-utility/docs/script-dir/images/ui-icons_cd0a0a_256x240.png diff --git a/utilities/docs/script-dir/jquery-3.5.1.min.js b/utilities/aes-gcm-java-utility/docs/script-dir/jquery-3.5.1.min.js similarity index 100% rename from utilities/docs/script-dir/jquery-3.5.1.min.js rename to utilities/aes-gcm-java-utility/docs/script-dir/jquery-3.5.1.min.js diff --git a/utilities/aes-gcm-java-utility/docs/script-dir/jquery-3.6.1.min.js b/utilities/aes-gcm-java-utility/docs/script-dir/jquery-3.6.1.min.js new file mode 100644 index 00000000..2c69bc90 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/script-dir/jquery-3.6.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=x.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthC(E(s),E(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),l.offset(x.extend(u,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,l=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=x("
    ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("
    ").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=x("
    ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||x.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?x(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(x.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=x.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(x("
    ").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),x.extend(x.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(x.ui.autocomplete.escapeRegex(e),"i");return x.grep(t,function(t){return i.test(t.label||t.value||t)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(e))},100))}});x.ui.autocomplete}); \ No newline at end of file diff --git a/utilities/docs/script-dir/jquery-ui.structure.min.css b/utilities/aes-gcm-java-utility/docs/script-dir/jquery-ui.structure.min.css similarity index 100% rename from utilities/docs/script-dir/jquery-ui.structure.min.css rename to utilities/aes-gcm-java-utility/docs/script-dir/jquery-ui.structure.min.css diff --git a/utilities/docs/script.js b/utilities/aes-gcm-java-utility/docs/script.js similarity index 77% rename from utilities/docs/script.js rename to utilities/aes-gcm-java-utility/docs/script.js index 864989cf..0765364e 100644 --- a/utilities/docs/script.js +++ b/utilities/aes-gcm-java-utility/docs/script.js @@ -1,26 +1,26 @@ /* * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * */ var moduleSearchIndex; diff --git a/utilities/docs/search.js b/utilities/aes-gcm-java-utility/docs/search.js similarity index 91% rename from utilities/docs/search.js rename to utilities/aes-gcm-java-utility/docs/search.js index 2246cdd0..df0e6fb7 100644 --- a/utilities/docs/search.js +++ b/utilities/aes-gcm-java-utility/docs/search.js @@ -1,26 +1,26 @@ /* * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. */ var noResult = {l: "No results found"}; diff --git a/utilities/docs/stylesheet.css b/utilities/aes-gcm-java-utility/docs/stylesheet.css similarity index 99% rename from utilities/docs/stylesheet.css rename to utilities/aes-gcm-java-utility/docs/stylesheet.css index 836c62da..6dc5b365 100644 --- a/utilities/docs/stylesheet.css +++ b/utilities/aes-gcm-java-utility/docs/stylesheet.css @@ -597,9 +597,6 @@ main, nav, header, footer, section { background-color:#4D7A97; color:#FFFFFF; } -.result-item { - font-size:13px; -} .ui-autocomplete { max-height:85%; max-width:65%; @@ -611,13 +608,17 @@ main, nav, header, footer, section { ul.ui-autocomplete { position:fixed; z-index:999999; + background-color: #FFFFFF; } ul.ui-autocomplete li { float:left; clear:both; width:100%; } -.result-highlight { +.ui-autocomplete .result-item { + font-size: inherit; +} +.ui-autocomplete .result-highlight { font-weight:bold; } #search-input { diff --git a/utilities/aes-gcm-java-utility/docs/tag-search-index.js b/utilities/aes-gcm-java-utility/docs/tag-search-index.js new file mode 100644 index 00000000..f2a440c7 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/aes-gcm-java-utility/docs/type-search-index.js b/utilities/aes-gcm-java-utility/docs/type-search-index.js new file mode 100644 index 00000000..bb637541 --- /dev/null +++ b/utilities/aes-gcm-java-utility/docs/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.ondc","l":"App"},{"p":"org.ondc","l":"KeyUtil.DHKeyPair"},{"p":"org.ondc","l":"EncryptionUtil.EncryptionPayload"},{"p":"org.ondc","l":"EncryptionUtil"},{"p":"org.ondc","l":"KeyUtil"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/aes-gcm-java-utility/pom.xml b/utilities/aes-gcm-java-utility/pom.xml new file mode 100644 index 00000000..e1ceba54 --- /dev/null +++ b/utilities/aes-gcm-java-utility/pom.xml @@ -0,0 +1,99 @@ + + + + 4.0.0 + + org.ondc + encryption_util + 1.0-SNAPSHOT + + encryption_util + + + UTF-8 + 1.7 + 1.7 + + + + + + org.springframework.boot + spring-boot-starter-actuator + 3.1.0 + + + + org.bouncycastle + bcprov-jdk15on + 1.70 + + + com.google.code.gson + gson + 2.10.1 + + + org.springframework.boot + spring-boot-starter-test + 3.1.0 + + + org.junit.jupiter + junit-jupiter + 5.10.0-M1 + + + org.assertj + assertj-core + 3.24.2 + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + diff --git a/utilities/aes-gcm-java-utility/readme.md b/utilities/aes-gcm-java-utility/readme.md new file mode 100644 index 00000000..8721984a --- /dev/null +++ b/utilities/aes-gcm-java-utility/readme.md @@ -0,0 +1,125 @@ + +# AES GCM Encryption and Decryption + +Instructions for using the utility + +## Add the following dependencies to your project: +```xml + + org.bouncycastle + bcprov-jdk15on + 1.70 + + + + com.google.code.gson + gson + 2.10.1 + +``` + +Add the following classes to your project: +``` +KeyUtil.java +EncryptionUtil.java +``` +Make sure to rename the package name of these files acording to your project's package name. + +## Add BouncyCastleProvider to java.security.Security +Add the BouncyCastleProvider to the java Security class. Below is the implementation of the same. +```java +import java.security.Security; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + +class MainClass { + public static void main(String[] args) { + Security.addProvider(new BouncyCastleProvider()); + + // Encryption / Decryption code. + } +} +``` + +## Generating a Key Pair +1\. Generate Encryption Key Pair: +```java +DHKeyPair keyPair = KeyUtil.generateKeyPair(); +``` + +2\. Save your Private key: +```java +String privateKey = keyPair.getPrivateKey(); +``` + +3\. Share your Public key with the other party: +```java +String publicKey = keyPair.getPublicKey(); +``` + +## Generating a Shared key between two parties: +1\. Get the public key from the other party: +```java +String publicKeyOfOtherParty = "PUBLIC_KEY_GOES_HERE"; +``` + +2\. Generate the sharedKey using your private key and public key of other party: +```java +String myPrivateKey = "YOUR_PRIVATE_KEY_GOES_HERE"; + +String sharedKey = KeyUtil.generateSharedKey(myPrivateKey, publicKeyOfOtherParty); +``` + +3\. This shared key will be used for both encryption and decryption. The same sharedKey can be generated by the other party if your publicKey is shared with them. + + +## Encryption + +1\. Get the public key of the BPP: +```java +String bppPublicKey = "BPP_PUBLIC_KEY_GOES_HERE"; +``` + +2\. Generate the sharedKey using the BPP's public key and your private key: +```java +String myPrivateKey = "YOUR_PRIVATE_KEY_GOES_HERE"; + +String sharedKey = KeyUtil.generateSharedKey(myPrivateKey, bppPublicKey); +``` + +3\. Encrypt the data: +```java +String rawData = "Hello This is ONDC Test Data"; + +String encryptedData = EncryptionUtil.encryptData(sharedKey, rawData); +``` + +4\. Send the Encrypted data and your public key to the BPP. + + +## Decryption +1\. Get the Public key of the BAP: +```java +String bapPublicKey = "BAP_PUBLIC_KEY_GOES_HERE"; +``` + +2\. Generate the shared key using your private key and BAP's public key: +```java +String myPrivateKey = "YOUR_PRIVATE_KEY_GOES_HERE"; + +String sharedKey = KeyUtil.generateSharedKey(myPrivateKey, bapPublicKey); +``` + +3\. Decrypt the data: +```java +String encryptedData = "ENCRYPTED_DATA_RECEIVED_FROM_BAP"; + +String decryptedData = EncryptionUtil.decryptData(sharedKey, encryptedData); + +System.out.println(decryptedData); // Hello This is ONDC Test Data +``` + +## Abbrevations + +BAP - Beckn Application Platform (Sender) + +BPP - Beckn Provider Platform (Receiver) \ No newline at end of file diff --git a/utilities/aes-gcm-java-utility/src/main/java/org/ondc/App.java b/utilities/aes-gcm-java-utility/src/main/java/org/ondc/App.java new file mode 100644 index 00000000..2a741eb1 --- /dev/null +++ b/utilities/aes-gcm-java-utility/src/main/java/org/ondc/App.java @@ -0,0 +1,56 @@ +package org.ondc; + +import java.security.Security; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.ondc.KeyUtil.DHKeyPair; + +/** + * Class depicting the usage of the utility. + */ +public class App { + private static Logger logger = Logger.getLogger("InfoLogger"); + + /** + * Main Function. + * @param args Main Function Args. + */ + public static void main(String[] args) { + + // Adding the BouncyCastleProvider to java.security.Security. + Security.addProvider(new BouncyCastleProvider()); + + // Generate Key Pair for User 1. + DHKeyPair keyPair1 = KeyUtil.generateKeyPair(); + logger.log(Level.INFO, "Key Pair 1 ==> {0}", keyPair1); + + // Generate Key Pair for User 2. + DHKeyPair keyPair2 = KeyUtil.generateKeyPair(); + logger.log(Level.INFO, "Key Pair 2 ==> {0}", keyPair2); + + // Generate Shared Key with User 1's Private Key and User 2's Public Key. + String sharedKey1 = KeyUtil.generateSharedKey(keyPair1.getPrivateKey(), keyPair2.getPublicKey()); + logger.log(Level.INFO, "SharedKey1 ==> {0}", sharedKey1); + + // Generate Shared Key with User 2's Private Key and User 1's Public Key. + String sharedKey2 = KeyUtil.generateSharedKey(keyPair2.getPrivateKey(), keyPair1.getPublicKey()); + logger.log(Level.INFO, "SharedKey2 ==> {0}", sharedKey2); + + // Comparing the two Shared keys generated above. + logger.log(Level.INFO, "sharedKey1 == sharedKey2 ==> {0}", sharedKey1.equals(sharedKey2)); + + // Initializing the raw text to be encrypted. + String rawData = "Hello This is ONDC Test Data"; + + // Encrypting the raw data. + String encryptedData = EncryptionUtil.encryptData(sharedKey1, rawData); + logger.log(Level.INFO, "Encrypted Data ===> {0}", encryptedData); + + // Decrypting the Encrypted data. + String decryptedData = EncryptionUtil.decryptData(sharedKey2, encryptedData); + logger.log(Level.INFO, "Decrypted Data ===> {0}", decryptedData); + + } +} \ No newline at end of file diff --git a/utilities/aes-gcm-java-utility/src/main/java/org/ondc/EncryptionUtil.java b/utilities/aes-gcm-java-utility/src/main/java/org/ondc/EncryptionUtil.java new file mode 100644 index 00000000..67948317 --- /dev/null +++ b/utilities/aes-gcm-java-utility/src/main/java/org/ondc/EncryptionUtil.java @@ -0,0 +1,238 @@ +package org.ondc; + +import java.security.SecureRandom; +import java.util.Arrays; +import java.util.Base64; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.GCMParameterSpec; +import javax.crypto.spec.SecretKeySpec; + +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; + + +/** + * Utility class for encrypting and decrypting payload. + */ +public class EncryptionUtil { + private static Logger log = Logger.getLogger("ErrorLogger"); + + private EncryptionUtil() { + + } + /** + * The standard Initialization Vector (IV) length (96 bits). + */ + public static final int IV_BIT_LENGTH = 96; + + /** + * The standard authentication tag length (128 bits). + */ + public static final int AUTH_TAG_BIT_LENGTH = 128; + + + /** + * + * The POJO class for Encrypted Data. + * + */ + public static class EncryptionPayload { + + /** + * The Nonce / IV (Initialization Vector) created for encrypting the data. + */ + private String nonce; + + /** + * The Encrypted Data in base64 encoded format. + */ + @SerializedName("encrypted_data") + private String encrypedData; + + /** + * The HMAC + */ + private String hmac; + + /** + * Gets the Encrypted Data + * @return The Encrypted Data. + */ + public String getEncrypedData() { + return encrypedData; + } + + /** + * Sets the Encrypted Data. + * @param encrypedData The Encrypted Data. + */ + private void setEncrypedData(String encrypedData) { + this.encrypedData = encrypedData; + } + + /** + * Gets the Nonce. + * @return The Nonce. + */ + public String getNonce() { + return nonce; + } + + /** + * Sets the Nonce. + * @param nonce The Nonce. + */ + private void setNonce(String nonce) { + this.nonce = nonce; + } + + /** + * Gets the HMAC. + * @return The HMAC. + */ + public String getHmac() { + return hmac; + } + + /** + * Sets the HMAC. + * @param hmac The HMAC. + */ + private void setHmac(String hmac) { + this.hmac = hmac; + } + + /** + * A Method to convert this instance of a class to base64 string. + * @return Base64 Encoded string of the object. + */ + public String toBase64String() { + return bytesToString(new Gson().toJson(this).getBytes()); + } + + } + + /** + * Encrypts the specified plain text using AES/GCM/NoPadding. + * @param key The Shared Key. + * @param data The Raw Data to be Encrypted. + * @return The Encrypted data in base64 encoded format. + */ + public static String encryptData(String key, String data) { + + // Initialize a EncryptionPayload Object. + String enryptionPayload = null; + try { + + // Create a Cipher instance. + Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); + + // De-serializing the Shared Key. + SecretKey sKey = KeyUtil.sharedKeyFromString(key); + SecretKeySpec keySpec = new SecretKeySpec(sKey.getEncoded(), "AES"); + + // Randomly generate the IV / nonce. + SecureRandom secureRandom = new SecureRandom(); + byte[] iv = new byte[IV_BIT_LENGTH / 8]; + secureRandom.nextBytes(iv); + + // Initialize AES/GCM cipher for encryption + cipher.init(Cipher.ENCRYPT_MODE, keySpec, new GCMParameterSpec(AUTH_TAG_BIT_LENGTH, iv)); + + // Encrypt the raw data and get the cipher text and authentication tag. + byte[] eData = cipher.doFinal(data.getBytes()); + EncryptionPayload encryptedData = new EncryptionPayload(); + int tagLengthBytes = AUTH_TAG_BIT_LENGTH / Byte.SIZE; + + + byte[] encryptedText=Arrays.copyOfRange(eData, 0, eData.length - tagLengthBytes); + byte[] authTag= Arrays.copyOfRange(eData, eData.length - tagLengthBytes, eData.length); + + // Set the values for the EncryptedData object. + encryptedData.setEncrypedData(bytesToString(encryptedText)); + encryptedData.setNonce(bytesToString(iv)); + encryptedData.setHmac(bytesToString(authTag)); + + enryptionPayload = encryptedData.toBase64String(); + } catch (Exception e) { + log.log(Level.SEVERE, e.getMessage(), e); + } + + // Return the Encrypted Data. + return enryptionPayload; + } + + /** + * Decrypts the Encrypted Data using Shared Key. + * @param key The Shared Key. + * @param eData The Encrypted Data. + * @return The Raw Decrypted data. + */ + public static String decryptData(String key, String eData) { + + // Initialize a variable to store Decrypted Data. + String rawData = null; + + // Decode the base64 string and De-serialize it as› EncryptionPayload Object. + String json = stringToBytes(eData); + EncryptionPayload encryptedData = new Gson().fromJson(json, EncryptionPayload.class); + + try { + + // Create a Cipher instance. + Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); + + // Decode the fields of encryptedData from base64 to bytes. + byte[] nonce = Base64.getDecoder().decode(encryptedData.getNonce()); + byte[] authTagBytes = Base64.getDecoder().decode(encryptedData.getHmac()); + byte[] eBytes = Base64.getDecoder().decode(encryptedData.getEncrypedData()); + + byte[] encryptedBytes= Arrays.copyOf(eBytes, eBytes.length + authTagBytes.length); + System.arraycopy(authTagBytes,0,encryptedBytes,eBytes.length,authTagBytes.length); + + // De-serialize the Shared Key. + SecretKey sKey = KeyUtil.sharedKeyFromString(key); + SecretKeySpec keySpec = new SecretKeySpec(sKey.getEncoded(), "AES"); + + // Initialize the AES/GCM Cipher instance for decryption. + cipher.init(Cipher.DECRYPT_MODE, keySpec, new GCMParameterSpec(128, nonce)); + + + // Decrypt the data + byte[] dData = cipher.doFinal(encryptedBytes); + rawData = new String(dData); + + } catch (Exception e) { + log.log(Level.SEVERE, e.getMessage(), e); + } + + // Return the Decrypted Data.› + return rawData; + + } + + + /** + * Converts a Byte Array into base64 string. + * @param bytes The Byte Array to be encoded. + * @return The base64 encoded string. + */ + private static String bytesToString(byte[] bytes) { + return Base64.getEncoder().encodeToString(bytes); + } + + + /** + * Converts a base64 string into Byte Array. + * @param data The base64 encoded string. + * @return The decoded Byte Array. + */ + private static String stringToBytes(String data) { + byte[] bytes = Base64.getDecoder().decode(data); + return new String(bytes); + } +} \ No newline at end of file diff --git a/utilities/aes-gcm-java-utility/src/main/java/org/ondc/KeyUtil.java b/utilities/aes-gcm-java-utility/src/main/java/org/ondc/KeyUtil.java new file mode 100644 index 00000000..43ef1fba --- /dev/null +++ b/utilities/aes-gcm-java-utility/src/main/java/org/ondc/KeyUtil.java @@ -0,0 +1,186 @@ +package org.ondc; + +import java.security.Key; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.Base64; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.crypto.KeyAgreement; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; + +/** + * + * Utility Class to Generate Keypairs and Shared Key. + * + */ +public class KeyUtil { + private static Logger log = Logger.getLogger("ErrorLogger"); + + private KeyUtil() { + + } + + /** + * The Algorithm used to generate Key pairs. ("X25519"). + */ + public static final String KEYPAIR_GENERATION_ALGORITHM = "X25519"; + + /** + * + * POJO class for storing private and public keys. + * + */ + public static class DHKeyPair { + + /** + * The Public Key. + */ + private String publicKey; + + /** + * The Private Key. + */ + private String privateKey; + + /** + * Constructor + * @param keyPair Instance of java.security.KeyPair Class. + */ + public DHKeyPair(KeyPair keyPair) { + this.publicKey = keyToString(keyPair.getPublic()); + this.privateKey = keyToString(keyPair.getPrivate()); + } + + /** + * Gets the Public Key. + * @return Public Key. + */ + public String getPublicKey() { + return publicKey; + } + + /** + * Gets the Private Key. + * @return Private Key. + */ + public String getPrivateKey() { + return privateKey; + } + + /** + * String Formatting. + */ + @Override + public String toString() { + return "DHKeyPair [publicKey=" + publicKey + ", privateKey=" + privateKey + "]"; + } + + + } + + /** + * Generate a Keypair. + * @return Generated Keypair. + */ + public static DHKeyPair generateKeyPair() { + DHKeyPair generatedKeyPair = null; + try { + KeyPair keyPair = KeyPairGenerator.getInstance(KEYPAIR_GENERATION_ALGORITHM).generateKeyPair(); + generatedKeyPair = new DHKeyPair(keyPair); + } catch (Exception e) { + log.log(Level.SEVERE, e.getMessage(), e); + } + return generatedKeyPair; + } + + /** + * Generates a SharedKey. + * @param privateKeyStr Private Key of one party. + * @param publicKeyStr Public Key of the other party. + * @return Shared key as base64 string. + */ + public static String generateSharedKey(String privateKeyStr, String publicKeyStr){ + + // Initialize the variables to store Shared Key and Key Agreement. + String sharedKey = null; + KeyAgreement ka; + + try { + + // De-serializing the private key and public key. + Key privateKey = privateKeyFromString(privateKeyStr); + Key publicKey = publicKeyFromString(publicKeyStr); + + // Intializing a key agreement instance. + ka = KeyAgreement.getInstance(KEYPAIR_GENERATION_ALGORITHM, "BC"); + ka.init(privateKey); + + // Generate the Shared Key. + ka.doPhase(publicKey, true); + SecretKey sKey = ka.generateSecret("AES"); + sharedKey = keyToString(sKey); + + } catch (Exception e) { + log.log(Level.SEVERE, e.getMessage(), e); + } + + // Return the Shared Key. + return sharedKey; + } + + /** + * Encode a key to base64 string. + * @param key The key to encode. + * @return The Encoded Key. + */ + private static String keyToString(Key key) { + byte[] encodedKey = key.getEncoded(); + return Base64.getEncoder().encodeToString(encodedKey); + } + + /** + * Get the Public Key from base64 encoded string. + * @param publicKeyStr The base64 encoded Public Key string. + * @return The Decoded Public Key. + * @throws NoSuchAlgorithmException Thrown when invalid keypair generation algorithm is configured. + * @throws InvalidKeySpecException Thrown if the public key is invalid. + */ + private static PublicKey publicKeyFromString(String publicKeyStr) throws NoSuchAlgorithmException, InvalidKeySpecException { + byte[] encodedKey = Base64.getDecoder().decode(publicKeyStr); + KeyFactory keyFactory = KeyFactory.getInstance(KEYPAIR_GENERATION_ALGORITHM); + return keyFactory.generatePublic(new X509EncodedKeySpec(encodedKey)); + } + + /** + * Get the Private Key from base64 encoded string. + * @param privateKeyStr The base64 encoded Private Key string. + * @return The Decoded Private Key. + * @throws NoSuchAlgorithmException Thrown when invalid keypair generation algorithm is configured. + * @throws InvalidKeySpecException Thrown if the private key is invalid. + */ + private static PrivateKey privateKeyFromString(String privateKeyStr) throws NoSuchAlgorithmException, InvalidKeySpecException { + byte[] encodedKey = Base64.getDecoder().decode(privateKeyStr); + KeyFactory keyFactory = KeyFactory.getInstance(KEYPAIR_GENERATION_ALGORITHM); + return keyFactory.generatePrivate(new PKCS8EncodedKeySpec(encodedKey)); + } + + /** + * Get the Shared Key from base64 encoded string. + * @param sharedKeyString The base64 encoded Shared Key String. + * @return The Decoded Shared Key. + */ + protected static SecretKey sharedKeyFromString(String sharedKeyString) { + byte[] decodedKey = Base64.getDecoder().decode(sharedKeyString); + return new SecretKeySpec(decodedKey, KEYPAIR_GENERATION_ALGORITHM); + } +} \ No newline at end of file diff --git a/utilities/aes-gcm-java-utility/src/test/java/org/ondc/KeyUtilTest.java b/utilities/aes-gcm-java-utility/src/test/java/org/ondc/KeyUtilTest.java new file mode 100644 index 00000000..f0bcfac9 --- /dev/null +++ b/utilities/aes-gcm-java-utility/src/test/java/org/ondc/KeyUtilTest.java @@ -0,0 +1,48 @@ +package org.ondc; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.security.Security; + +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.junit.jupiter.api.Test; +import org.ondc.KeyUtil.DHKeyPair; + +class KeyUtilTest { + DHKeyPair keyPair1 = KeyUtil.generateKeyPair(); + DHKeyPair keyPair2 = KeyUtil.generateKeyPair(); + + @Test + void testGenerateSharedKey() { + Security.addProvider(new BouncyCastleProvider()); + + // Positive testcase + String sharedKey1 = KeyUtil.generateSharedKey(keyPair1.getPrivateKey(), keyPair2.getPublicKey()); + String sharedKey2 = KeyUtil.generateSharedKey(keyPair2.getPrivateKey(), keyPair1.getPublicKey()); + assertThat(sharedKey1).isEqualTo(sharedKey2); + + // Negative testcase + sharedKey1 = KeyUtil.generateSharedKey(keyPair1.getPrivateKey(), keyPair1.getPublicKey()); + sharedKey2 = KeyUtil.generateSharedKey(keyPair2.getPrivateKey(), keyPair2.getPublicKey()); + assertThat(sharedKey1).isNotEqualTo(sharedKey2); + } + + @Test + void testEncryptDecrypt() { + Security.addProvider(new BouncyCastleProvider()); + String sharedKey = KeyUtil.generateSharedKey(keyPair1.getPrivateKey(), keyPair2.getPublicKey()); + + String plainText = "ONDC is a greate initiative!"; + + // Positive testcases + String encryptedText = EncryptionUtil.encryptData(sharedKey, plainText); + String decryptedText = EncryptionUtil.decryptData(sharedKey, encryptedText); + assertThat(decryptedText).isEqualTo(plainText); + + // Negative Test case + String invalidSharedKey = "GhkO6Qx1BIkqSV/yW2xEAG3jNVki6QE29gujYJ6HJ3E="; + encryptedText = EncryptionUtil.encryptData(sharedKey, plainText); + decryptedText = EncryptionUtil.decryptData(invalidSharedKey, encryptedText); + assertThat(decryptedText).isNotEqualTo(plainText); + } +} \ No newline at end of file diff --git a/utilities/docs/element-list b/utilities/docs/element-list deleted file mode 100644 index 4f368760..00000000 --- a/utilities/docs/element-list +++ /dev/null @@ -1 +0,0 @@ -org.ondc.crypto.util diff --git a/utilities/docs/index-files/index-1.html b/utilities/docs/index-files/index-1.html deleted file mode 100644 index 2afef9d3..00000000 --- a/utilities/docs/index-files/index-1.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -C-Index - - - - - - - - - - - - - - - -
    - -
    -
    -
    -

    Index

    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages -

    C

    -
    -
    CryptoFunctions - Class in org.ondc.crypto.util
    -
    -
    The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.
    -
    -
    CryptoFunctions() - Constructor for class org.ondc.crypto.util.CryptoFunctions
    -
     
    -
    CryptoKeyPair - Class in org.ondc.crypto.util
    -
    -
    The Class CryptoKeyPair is used to store keypair
    -
    -
    CryptoKeyPair(byte[], byte[]) - Constructor for class org.ondc.crypto.util.CryptoKeyPair
    -
    -
    Instantiates a new crypto key pair.
    -
    -
    CryptoTest - Class in org.ondc.crypto.util
    -
    -
    The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions
    -
    -
    CryptoTest() - Constructor for class org.ondc.crypto.util.CryptoTest
    -
     
    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages
    -
    -
    - - diff --git a/utilities/docs/index-files/index-2.html b/utilities/docs/index-files/index-2.html deleted file mode 100644 index 335f9e0f..00000000 --- a/utilities/docs/index-files/index-2.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - -E-Index - - - - - - - - - - - - - - - -
    - -
    -
    -
    -

    Index

    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages -

    E

    -
    -
    encryptDecrypt(int, byte[], byte[], byte[]) - Static method in class org.ondc.crypto.util.CryptoFunctions
    -
    -
    This method can be used to do AES encryption and decryption using X25519 Key exchange algorithm
    -
    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages
    -
    -
    - - diff --git a/utilities/docs/index-files/index-3.html b/utilities/docs/index-files/index-3.html deleted file mode 100644 index 338417b9..00000000 --- a/utilities/docs/index-files/index-3.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -G-Index - - - - - - - - - - - - - - - -
    - -
    -
    -
    -

    Index

    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages -

    G

    -
    -
    generateBlakeHash(String) - Static method in class org.ondc.crypto.util.CryptoFunctions
    -
    -
    Generate blake hash.
    -
    -
    generateEncDecKey() - Static method in class org.ondc.crypto.util.CryptoFunctions
    -
    -
    Generate encryption decryption key pair using x25519 key exchange algorithm.
    -
    -
    generateSigningKeyPair() - Static method in class org.ondc.crypto.util.CryptoFunctions
    -
    -
    This method generates ED25519 32 byte/256 bits key pair (Private and Public) for Signing
    -
    -
    getPrivateKey() - Method in class org.ondc.crypto.util.CryptoKeyPair
    -
    -
    Gets the private key.
    -
    -
    getPublickKey() - Method in class org.ondc.crypto.util.CryptoKeyPair
    -
    -
    Gets the public key.
    -
    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages
    -
    -
    - - diff --git a/utilities/docs/index-files/index-5.html b/utilities/docs/index-files/index-5.html deleted file mode 100644 index a2744ffa..00000000 --- a/utilities/docs/index-files/index-5.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - -S-Index - - - - - - - - - - - - - - - -
    - -
    -
    -
    -

    Index

    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages -

    S

    -
    -
    setPrivateKey(byte[]) - Method in class org.ondc.crypto.util.CryptoKeyPair
    -
    -
    Sets the private key.
    -
    -
    setPublicKey(byte[]) - Method in class org.ondc.crypto.util.CryptoKeyPair
    -
    -
    Sets the public key.
    -
    -
    sign(byte[], byte[]) - Static method in class org.ondc.crypto.util.CryptoFunctions
    -
    -
    This method generates signature using given ED25519 32 byte/ 256 bits Private key
    -
    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages
    -
    -
    - - diff --git a/utilities/docs/index-files/index-6.html b/utilities/docs/index-files/index-6.html deleted file mode 100644 index b0f148c4..00000000 --- a/utilities/docs/index-files/index-6.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - -T-Index - - - - - - - - - - - - - - - -
    - -
    -
    -
    -

    Index

    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages -

    T

    -
    -
    testGenerateBlakeHash() - Method in class org.ondc.crypto.util.CryptoTest
    -
     
    -
    testGenerateEncryptionDecryptionKeyPair_Normal() - Method in class org.ondc.crypto.util.CryptoTest
    -
    -
    Test generate encryption decryption key pair, encrypt and then decrypt.
    -
    -
    testGenerateSigningKeyPair_Normal() - Method in class org.ondc.crypto.util.CryptoTest
    -
    -
    Test generation of signing key pair
    -
    -
    testGenerateSigningKeyPair_Tampered() - Method in class org.ondc.crypto.util.CryptoTest
    -
    -
    Test to verify tampered message and signature
    -
    -
    -C E G O S T V 
    All Classes and Interfaces|All Packages
    -
    -
    - - diff --git a/utilities/docs/jquery-ui.overrides.css b/utilities/docs/jquery-ui.overrides.css deleted file mode 100644 index f89acb63..00000000 --- a/utilities/docs/jquery-ui.overrides.css +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -.ui-state-active, -.ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active, -a.ui-button:active, -.ui-button:active, -.ui-button.ui-state-active:hover { - /* Overrides the color of selection used in jQuery UI */ - background: #F8981D; -} diff --git a/utilities/docs/legal/LICENSE b/utilities/docs/legal/LICENSE deleted file mode 100644 index 4ad9fe40..00000000 --- a/utilities/docs/legal/LICENSE +++ /dev/null @@ -1 +0,0 @@ -Please see ..\java.base\LICENSE diff --git a/utilities/docs/member-search-index.js b/utilities/docs/member-search-index.js deleted file mode 100644 index 95d50baf..00000000 --- a/utilities/docs/member-search-index.js +++ /dev/null @@ -1 +0,0 @@ -memberSearchIndex = [{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"CryptoFunctions()","u":"%3Cinit%3E()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"CryptoKeyPair(byte[], byte[])","u":"%3Cinit%3E(byte[],byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"CryptoTest()","u":"%3Cinit%3E()"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"encryptDecrypt(int, byte[], byte[], byte[])","u":"encryptDecrypt(int,byte[],byte[],byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"generateBlakeHash(String)","u":"generateBlakeHash(java.lang.String)"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"generateEncDecKey()"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"generateSigningKeyPair()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"getPrivateKey()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"getPublickKey()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"setPrivateKey(byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"setPublicKey(byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"sign(byte[], byte[])","u":"sign(byte[],byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateBlakeHash()"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateEncryptionDecryptionKeyPair_Normal()"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateSigningKeyPair_Normal()"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateSigningKeyPair_Tampered()"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"verify(byte[], byte[], byte[])","u":"verify(byte[],byte[],byte[])"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/docs/script-dir/jquery-ui.min.css b/utilities/docs/script-dir/jquery-ui.min.css deleted file mode 100644 index 6be72f58..00000000 --- a/utilities/docs/script-dir/jquery-ui.min.css +++ /dev/null @@ -1,7 +0,0 @@ -/*! jQuery UI - v1.12.1 - 2018-12-06 -* http://jqueryui.com -* Includes: core.css, autocomplete.css, menu.css, theme.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=custom-theme&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgImgOpacityContent=75&bgImgOpacityHeader=75&cornerRadiusShadow=8px&offsetLeftShadow=-8px&offsetTopShadow=-8px&thicknessShadow=8px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=%23aaaaaa&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=%23aaaaaa&iconColorError=%23cd0a0a&fcError=%23cd0a0a&borderColorError=%23cd0a0a&bgTextureError=glass&bgColorError=%23fef1ec&iconColorHighlight=%232e83ff&fcHighlight=%23363636&borderColorHighlight=%23fcefa1&bgTextureHighlight=glass&bgColorHighlight=%23fbf9ee&iconColorActive=%23454545&fcActive=%23212121&borderColorActive=%23aaaaaa&bgTextureActive=glass&bgColorActive=%23dadada&iconColorHover=%23454545&fcHover=%23212121&borderColorHover=%23999999&bgTextureHover=glass&bgColorHover=%23dadada&iconColorDefault=%23888888&fcDefault=%23555555&borderColorDefault=%23d3d3d3&bgTextureDefault=glass&bgColorDefault=%23e6e6e6&iconColorContent=%23222222&fcContent=%23222222&borderColorContent=%23aaaaaa&bgTextureContent=flat&bgColorContent=%23ffffff&iconColorHeader=%23222222&fcHeader=%23222222&borderColorHeader=%23aaaaaa&bgTextureHeader=highlight_soft&bgColorHeader=%23cccccc&cornerRadius=4px&fwDefault=normal&fsDefault=1.1em&ffDefault=Verdana%2CArial%2Csans-serif -* Copyright jQuery Foundation and other contributors; Licensed MIT */ - -.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #d3d3d3}.ui-widget-content{border:1px solid #aaa;background:#fff;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#212121;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #aaa;background:#dadada url("images/ui-bg_glass_65_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-icon-background,.ui-state-active .ui-icon-background{border:#aaa;background-color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-checked{border:1px solid #fcefa1;background:#fbf9ee}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:-8px -8px 8px #aaa;box-shadow:-8px -8px 8px #aaa} \ No newline at end of file diff --git a/utilities/docs/script-dir/jquery-ui.min.js b/utilities/docs/script-dir/jquery-ui.min.js deleted file mode 100644 index 54d4beb8..00000000 --- a/utilities/docs/script-dir/jquery-ui.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! jQuery UI - v1.12.1 - 2018-12-06 -* http://jqueryui.com -* Includes: widget.js, position.js, keycode.js, unique-id.js, widgets/autocomplete.js, widgets/menu.js -* Copyright jQuery Foundation and other contributors; Licensed MIT */ - -(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){t.ui=t.ui||{},t.ui.version="1.12.1";var e=0,i=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var s,n,o=i.call(arguments,1),a=0,r=o.length;r>a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
    "),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"
      ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
        ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
        ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
        ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
        ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
        ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}); \ No newline at end of file diff --git a/utilities/docs/tag-search-index.js b/utilities/docs/tag-search-index.js deleted file mode 100644 index 0367dae6..00000000 --- a/utilities/docs/tag-search-index.js +++ /dev/null @@ -1 +0,0 @@ -tagSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/utilities/docs/type-search-index.js b/utilities/docs/type-search-index.js deleted file mode 100644 index d90ed037..00000000 --- a/utilities/docs/type-search-index.js +++ /dev/null @@ -1 +0,0 @@ -typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.ondc.crypto.util","l":"CryptoFunctions"},{"p":"org.ondc.crypto.util","l":"CryptoKeyPair"},{"p":"org.ondc.crypto.util","l":"CryptoTest"}];updateSearchResults(); \ No newline at end of file