fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject [fineract-cn-test] 19/32: Added little helper function for encoding password.
Date Mon, 22 Jan 2018 15:13:24 GMT
This is an automated email from the ASF dual-hosted git repository.

myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-test.git

commit 0896873922e9bc10f384886b15322031fdaaa1fb
Author: myrle-krantz <mkrantz@mifos.org>
AuthorDate: Sat Apr 29 15:04:31 2017 +0200

    Added little helper function for encoding password.
---
 src/main/java/io/mifos/core/test/env/TestEnvironment.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main/java/io/mifos/core/test/env/TestEnvironment.java b/src/main/java/io/mifos/core/test/env/TestEnvironment.java
index 284f3ee..6e27da6 100644
--- a/src/main/java/io/mifos/core/test/env/TestEnvironment.java
+++ b/src/main/java/io/mifos/core/test/env/TestEnvironment.java
@@ -18,6 +18,7 @@ package io.mifos.core.test.env;
 import io.mifos.core.lang.AutoTenantContext;
 import io.mifos.core.lang.security.RsaKeyPairFactory;
 import org.junit.rules.ExternalResource;
+import org.springframework.util.Base64Utils;
 
 import java.security.interfaces.RSAPrivateKey;
 import java.security.interfaces.RSAPublicKey;
@@ -102,6 +103,10 @@ public final class TestEnvironment extends ExternalResource {
     return "cleopatra" + Math.abs(new Random().nextInt());
   }
 
+  public static String encodePassword(final String password) {
+    return Base64Utils.encodeToString(password.getBytes());
+  }
+
   Properties properties;
   private RsaKeyPairFactory.KeyPairHolder keyPairHolder;
   private int uniquenessSuffix = 0;

-- 
To stop receiving notification emails like this one, please contact
myrle@apache.org.

Mime
View raw message