brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alasdairhodge <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #301: Test+fix DeferredSuppliers in $brooklyn:o...
Date Mon, 15 Aug 2016 12:33:06 GMT
Github user alasdairhodge commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/301#discussion_r74754674
  
    --- Diff: camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ObjectsYamlTest.java
---
    @@ -84,6 +94,17 @@ public void setManagementContext(ManagementContext managementContext)
{
             }
         }
     
    +    // TODO Copy of org.apache.brooklyn.rest.security.PasswordHasher; but this module
does not
    +    // have access to brooklyn-rest-resources (and would create a circular reference
to do so)
    +    public static class PasswordHasher {
    +        public static String sha256(String salt, String password) {
    +            if (salt == null) salt = "";
    +            byte[] bytes = (salt + password).getBytes(Charsets.UTF_8);
    +            HashCode hash = Hashing.sha256().hashBytes(bytes);
    +            return hash.toString();
    +        }
    +    }
    --- End diff --
    
    Nice use-case, btw!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message