Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for encryptToString (0.08 sec)

  1. src/test/java/jcifs/util/SecureCredentialStorageTest.java

        @Test
        public void testBase64StringOperations() throws Exception {
            char[] plaintext = "TestPassword456".toCharArray();
    
            // Encrypt to string
            String encryptedStr = storage.encryptToString(plaintext);
            assertNotNull(encryptedStr, "Encrypted string should not be null");
            assertFalse(encryptedStr.contains("TestPassword456"), "Plaintext should not be visible in encrypted string");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  2. src/main/java/jcifs/util/SecureCredentialStorage.java

         *
         * @param plaintext the credentials to encrypt
         * @return base64 encoded encrypted credentials
         * @throws GeneralSecurityException if encryption fails
         */
        public String encryptToString(char[] plaintext) throws GeneralSecurityException {
            byte[] encrypted = encryptCredentials(plaintext);
            return Base64.getEncoder().encodeToString(encrypted);
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12.7K bytes
    - Viewed (0)
Back to top