Package org.keyczar.exceptions

Examples of org.keyczar.exceptions.NoPrimaryKeyException


   * JCE exception occurs.
   */
  public int digestSize() throws KeyczarException {
    KeyczarKey signingKey = getPrimaryKey();
    if (signingKey == null) {
      throw new NoPrimaryKeyException();
    }
    return HEADER_SIZE + ((SigningStream) signingKey.getStream()).digestSize();
  }
View Full Code Here


  void sign(ByteBuffer input, ByteBuffer hidden, long expirationTime,
      ByteBuffer output) throws KeyczarException {
    LOG.debug(Messages.getString("Signer.Signing", input.remaining()));
    KeyczarKey signingKey = getPrimaryKey();
    if (signingKey == null) {
      throw new NoPrimaryKeyException();
    }
    SigningStream stream = SIGN_QUEUE.poll();
    if (stream == null) {
      stream = (SigningStream) signingKey.getStream();
    }
View Full Code Here

   *                          or a JCE exception occurs.
   */
  public int digestSize() throws KeyczarException {
    KeyczarKey signingKey = getPrimaryKey();
    if (signingKey == null) {
      throw new NoPrimaryKeyException();
    }
    return ((SigningStream) signingKey.getStream()).digestSize();
  }
View Full Code Here

   */
  void sign(ByteBuffer input, ByteBuffer output) throws KeyczarException {
    LOG.debug(Messages.getString("Signer.Signing", input.remaining()));
    KeyczarKey signingKey = getPrimaryKey();
    if (signingKey == null) {
      throw new NoPrimaryKeyException();
    }
    SigningStream stream = SIGN_QUEUE.poll();
    if (stream == null) {
      stream = (SigningStream) signingKey.getStream();
    }
View Full Code Here

  public int ciphertextSize(int inputLength) throws KeyczarException {
    EncryptingStream cryptStream = ENCRYPT_QUEUE.poll();
    if (cryptStream == null) {
      KeyczarKey encryptingKey = getPrimaryKey();
      if (encryptingKey == null) {
        throw new NoPrimaryKeyException();
      }
      cryptStream = (EncryptingStream) encryptingKey.getStream();
    }
    SigningStream signStream = cryptStream.getSigningStream();
View Full Code Here

  public void encrypt(ByteBuffer input, ByteBuffer output)
      throws KeyczarException {
    LOG.debug(Messages.getString("Encrypter.Encrypting", input.remaining()));
    KeyczarKey encryptingKey = getPrimaryKey();
    if (encryptingKey == null) {
      throw new NoPrimaryKeyException() ;
    }
    EncryptingStream cryptStream = ENCRYPT_QUEUE.poll();
    if (cryptStream == null) {
      cryptStream = (EncryptingStream) encryptingKey.getStream();
    }
View Full Code Here

   * JCE exception occurs.
   */
  public int digestSize() throws KeyczarException {
    KeyczarKey signingKey = getPrimaryKey();
    if (signingKey == null) {
      throw new NoPrimaryKeyException();
    }
    return HEADER_SIZE + ((SigningStream) signingKey.getStream()).digestSize();
  }
View Full Code Here

    if (LOG.isDebugEnabled()) {
      LOG.debug(Messages.getString("Signer.Signing", input.remaining()));
    }
    KeyczarKey signingKey = getPrimaryKey();
    if (signingKey == null) {
      throw new NoPrimaryKeyException();
    }
    SigningStream stream = SIGN_QUEUE.poll();
    if (stream == null) {
      stream = (SigningStream) signingKey.getStream();
    }
View Full Code Here

   * @return The input data with an attached signature
   */
  public byte[] attachedSign(final byte[] blob, final byte[] hidden) throws KeyczarException {
    KeyczarKey signingKey = getPrimaryKey();
    if (signingKey == null) {
      throw new NoPrimaryKeyException();
    }

    SigningStream stream = SIGN_QUEUE.poll();

    if (stream == null) {
View Full Code Here

TOP

Related Classes of org.keyczar.exceptions.NoPrimaryKeyException

Copyright © 2018 www.massapicom. 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.