Examples of DigestType


Examples of br.net.woodstock.rockframework.security.digest.DigestType

    return type;
  }

  protected DigestType getDigestTypeFromSignature(final String signatureAlgorithm) {
    SignatureType signatureType = this.getSignatureType(signatureAlgorithm);
    DigestType digestType = signatureType.getDigestType();
    return digestType;
  }
View Full Code Here

Examples of ch.entwine.weblounge.common.security.DigestType

  @Override
  public boolean equals(Object o) {
    if (!(o instanceof Password))
      return false;
    Password pw = (Password) o;
    DigestType digestType = pw.getDigestType();
    switch (digestType) {
      case md5:
        return md5.equals(pw.getPassword());
      case plain:
        try {
View Full Code Here

Examples of ch.entwine.weblounge.common.security.DigestType

    if (StringUtils.isNotBlank(name))
      administrator.setName(name);
    if (StringUtils.isNotBlank(email))
      administrator.setEmail(email);

    DigestType digestType = DigestType.plain;
    if (StringUtils.isNotBlank(digest)) {
      try {
        digestType = DigestType.valueOf(digest);
      } catch (IllegalArgumentException e) {
        logger.error("Digest type '{}' is unknown", digest);
View Full Code Here

Examples of org.apache.bookkeeper.client.BookKeeper.DigestType

         * For the current ledger, open it to retrieve the LedgerHandle. This
         * will contain the LedgerMetadata indicating which bookie servers the
         * ledger fragments are stored on. Check if any of the ledger fragments
         * for the current ledger are stored on the input dead bookie.
         */
        DigestType digestType = getLedgerDigestType(lId);
        byte[] passwd = getLedgerPasswd(lId);
        bkc.asyncOpenLedgerNoRecovery(lId, digestType, passwd, new OpenCallback() {
            @Override
            public void openComplete(int rc, final LedgerHandle lh, Object ctx) {
                if (rc != Code.OK.intValue()) {
View Full Code Here

Examples of org.apache.bookkeeper.client.BookKeeper.DigestType

        bk = new BookKeeper(zkHostPort);
        int numLedgers = Integer.getInteger("nLedgers",5);
        lh = new LedgerHandle[numLedgers];
        int quorumSize = Integer.getInteger("quorum", 2);
        int ensembleSize = Integer.getInteger("ensemble", 4);
        DigestType digestType = DigestType.valueOf(System.getProperty("digestType", "CRC32"));
        for (int i=0; i< numLedgers; i++) {
            lh[i] = bk.createLedger(ensembleSize, quorumSize, digestType, "blah".getBytes());
        }

    }
View Full Code Here

Examples of org.apache.bookkeeper.client.BookKeeper.DigestType

    public void testBookkeeperPassword() throws Exception {
        ClientConfiguration conf = new ClientConfiguration()
            .setZkServers(zkUtil.getZooKeeperConnectString());
        BookKeeper bkc = new BookKeeper(conf);

        DigestType digestCorrect = digestType;
        byte[] passwdCorrect = "AAAAAAA".getBytes();
        DigestType digestBad = digestType == DigestType.MAC ? DigestType.CRC32 : DigestType.MAC;
        byte[] passwdBad = "BBBBBBB".getBytes();


        LedgerHandle lh = null;
        try {
View Full Code Here

Examples of org.apache.bookkeeper.client.BookKeeper.DigestType

    @Test(timeout=60000)
    public void recoverWithoutPasswordInConf() throws Exception {
        byte[] passwdCorrect = "AAAAAA".getBytes();
        byte[] passwdBad = "BBBBBB".getBytes();
        DigestType digestCorrect = digestType;
        DigestType digestBad = (digestType == DigestType.MAC) ? DigestType.CRC32 : DigestType.MAC;

        LedgerHandle lh = bkc.createLedger(3, 2, digestCorrect, passwdCorrect);
        long ledgerId = lh.getId();
        for (int i = 0; i < 100; i++) {
            lh.addEntry("foobar".getBytes());
View Full Code Here

Examples of org.apache.bookkeeper.client.BookKeeper.DigestType

        // and wipe the ledger layout so we can use an old client
        zkUtil.getZooKeeperClient().delete("/ledgers/LAYOUT", -1);

        byte[] passwdCorrect = "AAAAAA".getBytes();
        byte[] passwdBad = "BBBBBB".getBytes();
        DigestType digestCorrect = digestType;
        DigestType digestBad = digestCorrect == DigestType.MAC ? DigestType.CRC32 : DigestType.MAC;

        org.apache.bk_v4_1_0.bookkeeper.client.BookKeeper.DigestType digestCorrect410
            = org.apache.bk_v4_1_0.bookkeeper.client.BookKeeper.DigestType.valueOf(digestType.toString());

        org.apache.bk_v4_1_0.bookkeeper.conf.ClientConfiguration c
View Full Code Here

Examples of org.apache.bookkeeper.client.BookKeeper.DigestType

            cb.openComplete(rc, null, this.ctx);
            return;
        }

        final byte[] passwd;
        final DigestType digestType;

        /* For an administrative open, the default passwords
         * are read from the configuration, but if the metadata
         * already contains passwords, use these instead. */
        if (administrativeOpen && metadata.hasPassword()) {
View Full Code Here

Examples of org.apache.bookkeeper.client.BookKeeper.DigestType

         * For the current ledger, open it to retrieve the LedgerHandle. This
         * will contain the LedgerMetadata indicating which bookie servers the
         * ledger fragments are stored on. Check if any of the ledger fragments
         * for the current ledger are stored on the input dead bookie.
         */
        DigestType digestType = getLedgerDigestType(lId);
        byte[] passwd = getLedgerPasswd(lId);
        bkc.asyncOpenLedger(lId, digestType, passwd, new OpenCallback() {
            @Override
            public void openComplete(int rc, final LedgerHandle lh, Object ctx) {
                if (rc != Code.OK.intValue()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.